解决方法一: 在 Storyboard 设置 Separator Insets
在 Storyboard 中选择 Cell, Attributes inspector -> Separator -> Custom Insets:
Left 填写 0。
解决方法二:设置cell的边距
|
|
解决办法三:在cell中模拟出分隔线
将UITableView的separatorStyle属性设置为None,然后在cell的底部加一个View,设置该View的leading、trailing space to superView 为0,高度固定为1或者0.5,最后设置背景色。
参考链接:http://stackoverflow.com/questions/25770119/ios-8-uitableview-separator-inset-0-not-working