简体   繁体   中英

Draw a separator line on UIView in Storyboard

I am trying to draw a straight separator line on an UIView. Basically, this is not so hard but I was wondering if there exists an easier way to do this. For example in the Storyboard.

Actually, I am drawing the line using a self created UIView with 1px height and a certain background color.

What I want to do is something like in Apple's Mail App: (the separator line)

(Sorry for the huge image - is there a way to set the size in this editor?)

苹果邮件应用

My suggestion is to use a static UITableView. You can set it on storyboard and use your custom cells, and the tableView will create that separator lines. I would create each cell from storyboard.

Hope it helps you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM