A UITableView has seperator lines as shown in the following image. They do not start at the beginning of the row. See the red box in the image. I want to change where they start.
How can I specify where the separator lines in a table view begin?
A UITableView has seperator lines as shown in the following image. They do not start at the beginning of the row. See the red box in the image. I want to change where they start.
How can I specify where the separator lines in a table view begin?
Add Table View Separator Insets to Zero.
Add this code in cellForRowAtIndexPath
:
if (cell.respondsToSelector("preservesSuperviewLayoutMargins")){
cell.layoutMargins = UIEdgeInsetsZero
cell.preservesSuperviewLayoutMargins = false
}
See the preview :