[tableview setSeparatorColor:[UIColor redColor]]; //设置分割线为红色
隐藏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分隔线颜色为红色,并展示了如何隐藏分隔线,提供了具体的代码实现和相关枚举说明。
1149

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



