问题
I have a UITableView and I would like it to have 2 sections. I now know that you can only have grouped sections if you're using a UITableViewController and if you're using static cells, neither of which I am. Is that I want to do possible? If so where can I turn for help on setting this up. It seems like every tutorial I have found is for the example of using a UITableViewController.
回答1:
Setting the tableView's style property to .Grouped
and return 2
from numberOfSections...
-method should yield a good result. Where does this standard approach fail?
来源:https://stackoverflow.com/questions/35166864/create-grouped-tableview-without-using-tableviewcontroller