marsant marsant - 4 months ago 20
Objective-C Question

Add text under table sections in UITableView

I was trying to mimic a view like the iOS 7 "Shortcut".

enter image description here

I used a UITableViewController with static cells, 1 section and 2 rows. For the text "Create a shortcut that ...", I tried UILabel as well as the section footer. The problem with footer was that I could not figure out a way to wrap the long text to multiple lines. So I am curious about what's the "standard" or preferred way to implement the text under sections? Thanks!

Answer Source

If you select the Table View Section in the storyboard and enter your text in the 'Footer' it will automatically wrap.

enter image description here

If you want more control over the font you can set a custom footer view using -[UITableViewDelegate tableView:viewForFooterInSection:]