accessoryView
accessoryView
的大小也会影响到contentview的大小
设置缩进
indentationLevel
和indentationWidth
indentationLevel
和indentationWidth
乘积是缩进的距离。 indentationWidth
默认是10point。
if indexPath.row == 0 {
cell?.indentationLevel = 2;
}
else if indexPath.row == 1
{
cell?.indentationLevel = 2;
cell?.indentationWidth = 20;
}
设置分隔线的范围
separatorInset
默认分割线距离左边最短是15point。可以通过这个方法来设置。但是好像改变了这个值,系统默认的textlabel什么的也会移动。
cell?.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0)
cell?.separatorInset = UIEdgeInsetsMake(0, 30, 0, 40)
原文:http://www.cnblogs.com/huahuahu/p/UITableViewCell-bi-ji.html