• ios UITableView的style的区别与用法,以及分割线的显示与隐藏


    ******************tableview style******************************************************

    // tableview style不同的区别

    1、style=UITableViewStyleGrouped  默认会有headview和footview,头尾会空出一些距离,headview和footview会随tableview一起滑动,

      _saleTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, FRAMEW(self.view),  FRAMEH(self.view) - 56  - 64) style: UITableViewStyleGrouped];

     

    2、style=UITableViewStylePlain  默认没有headview和footview,自定义的headview和footview不会随tableview一起滑动,

      _saleTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, FRAMEW(self.view),  FRAMEH(self.view) - 56  - 64) style: UITableViewStylePlain];

     

    ******************关于分割线******************************************************

    1、//从新设置cell的背景,可以让cell分割线消失

      UIView *tempView = [[UIView alloc] init];

      tempView.backgroundColor=[UIColor whiteColor];

      [cell setBackgroundView:tempView];

     

    2、//也可以让分割线消失

      _saleTableView.separatorStyle = UITableViewCellSeparatorStyleNone;

      然后在viewcell里面自定义分割线
     
  • 相关阅读:
    Log4NET初接触
    wwwww
    关于ASP.NET 的进程帐户对 IIS 元数据库读访问权问题
    CentOS8 .NET Core项目部署
    CentOS7.6中安装Apache及Apache常见操作和配置说明
    .net core 命令行下启动指定端口
    Centos7安装mongodb
    centos8+oracle19开机自启动
    计算机网络常用端口
    Centos7安装mongodb
  • 原文地址:https://www.cnblogs.com/shen5214444887/p/9546516.html
Copyright © 2020-2023  润新知