White space before separator line into my TableView

后端 未结 8 1981
青春惊慌失措
青春惊慌失措 2020-11-30 19:49

I have a question about UITableView... I have a UITableViewController and I created a custom cell. When I visualize the tableView I see a little white space before the separ

8条回答
  •  爱一瞬间的悲伤
    2020-11-30 20:43

    Alternatively, you can also edit this in interface builder (IB):

    1. Go to IB.
    2. Select Table View.
    3. Open "Attribute Inspector" on the right.
    4. Change "Separator Insets" from Default to Custom.
    5. Change the "Left" attribute from 15 to 0.

    This has the same effect as @Ashok's answer, but doesn't require writing any code.

    Update Works on iOS 7 and 8

    Update Works on iOS 9

提交回复
热议问题