Reputation: 630
My question is I want my table view cell's separator to begin from specific position. Here is a visualization of what I want:
While I was searching, I found some questions about how to start separator line from beginning of the cell and explanations were made saying giving custom insets. I supposed same should work for me and I tried giving custom insets from interface builder. However it did not work.
Is there any solution for that?
Upvotes: 3
Views: 954
Reputation: 1693
i try and it work , in swift
self.tableView.separatorInset = UIEdgeInsets(top: 0, left: 35, bottom: 0, right: 0)
in Objective C:
self.tableView.separatorInset = UIEdgeInsetsMake(0, 80, 0, 0);
Upvotes: 5
Reputation: 2819
You can do it in Interface Builder. In the Attributes Inspector look for indentation and set it to what ever you want.
Upvotes: 1