tableView的常用设置方法

来源:互联网 发布:嫁给大山的女人知乎 编辑:程序博客网 时间:2024/05/18 03:33

*/下面我给大家介绍下tableView里面一些常用方法*/

//*************设置标题

self.title = @"联系人";

//**************设置标题栏不透明度

self.navigationControler.navigationBar.translucent = NO;

//**************设置设置背景颜色

self.backgroundColor =[WebColor black];

//************设置导航栏按钮颜色

self.navigationControler.navigationBar.tintColor = [UIColor redColor];

//************设置导航栏按钮(左右)两种方法

self.navigationItem.leftBarButtonItem = [[[UIBarButton alloc] initWithTitle:"编辑" style:UIBarButtonItemStyleBordered target:self action:@selector(click:)]autorease];

self.navigationItem.rightBarButtonItem = [[[UIBarButton alloc] initWithTitle:"编辑" style:UIBarButtonItemStyleBordered target:self action:@selector(click:)]autorease];

 self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:_button1];

 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem allocinitWithCustomView:_button1];

//************设置行高

self.rowHeight = 100;

//************设置分割线颜色

self.separatorInset = [UIColor greenColor];

//*************导航栏不能越界(更改透明度)

 self.navigationController.navigationBar.translucent = NO;

//*************设置偏移坐标

 self.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);



0 0
原创粉丝点击