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.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With