0

I saw this on this on the settings section of the Facebook app for iOS7 and I was wondering how the effect of this UITableView is achieved with the margins all around the section. I thought it could be done with UICollectionView with each cell having the look of having 2 or 3 "UITableViewCell's" in it. Is there a better way to achieve this though?

Thanks in advance

Facebook settings screenshot

Community
  • 1
  • 1
jacobsieradzki
  • 1,108
  • 2
  • 10
  • 32

2 Answers2

2

UITableView sections can either be "plain" or "grouped." The above is an example of "grouped" sections.

The inset margins were the common design until iOS7. That changed along w/other design conventions in order to maximize use of the screen. Sections in iOS7 can have upper/lower margins with headers and footers, but now extend to the left & right edges.

If you want to recreate the side margins, you can use autolayout to adjust the width of the entire tableView, as explained in this answer

Community
  • 1
  • 1
mc01
  • 3,750
  • 19
  • 24
0

It's probably a slight modification to UITableView's UIViewTableStyleGrouped.

tableView.style = UITableViewStyleGrouped;
esqew
  • 42,425
  • 27
  • 92
  • 132