How to control table section title's indentation in iOS 7?
cocoa-touch, ios, ios7, iphone, uitableview
Solution
Don't set the separatorInset for the UITableView. Instead, set the separatorInset for the UITableViewCell in the cellForRowAtIndexPath function:
[cell setSeparatorInset:UIEdgeInsetsMake(0, 50, 0, 0)];
Or do it in the story board if you prefer:
Problem
I suppose that the iOS 7 convention is to make the table cell separators start where the text starts. I wrote the following code to do this: ``` - (void)viewDidLoad { [super viewDidLoad]; self.tableView.separatorInset = 50.0; } ``` The problem is that my section titles also get shifted by the same amount. How would I control the indentation of the section titles independently from the cell separators? I would prefer that the section titles be left aligned.