UITableView的分割线(separator)是私有类,应该是无法获取的。
不过你可以通过tableView的属性修改它:
1
2
3
4
5
6
7
8
9
|
UITableView * tableView = [[UITableView alloc] initWithFrame:CGRectMake(20, 20, 400, 300) style:UITableViewStylePlain];
tableView.separatorColor = [UIColor redColor];
tableView.separatorInset = UIEdgeInsetsMake(0,80, 0, 80);
// 设置端距,这里表示separator离左边和右边均80像素
|