IOS 基础之设置 tableview 的分割线

2020-01-18 22:06:37刘景俊

 ios tableView 设置 tableview 的分割线

实现效果图:

IOS设置,tableview,的分割线,的分割线设置

  [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开发频道。