[tableview setSeparatorColor:[UIColor blueColor]]; //设置分割线为蓝色
隐藏UITableViewCell的分隔线
[self.myTableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
UITableViewCellSeparatorStyle有如下几种
typedef NS_ENUM(NSInteger, UITableViewCellSeparatorStyle) {
UITableViewCellSeparatorStyleNone,
UITableViewCellSeparatorStyleSingleLine,
UITableViewCellSeparatorStyleSingleLineEtched // This separator style is only supported for grouped style table views currently
};
效果如下
本文详细介绍了如何在iOS开发中设置UITableView的UITableViewCell分隔线颜色为蓝色,并展示了如何隐藏分隔线,包括分隔线样式的选择与应用。
1万+

被折叠的 条评论
为什么被折叠?



