UITableview group模式 出现的问题

来源:互联网 发布:linux dns如何配置文件 编辑:程序博客网 时间:2024/06/05 19:26

在ios7下,创建tableview分组模式时,顶部会出现一小块空白,用了:

self.edgesForExtendedLayout = UIRectEdgeNone

以及:

self.automaticallyAdjustsScrollViewInsets=NO

均无法实现,最后找到办法解决,是写入代码:

_infoTableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, _infoTableView.bounds.size.width, 0.01f)];

group模式时,self.view的背景是灰色,且用self.view.backgroundColor = [UIColor whiteColor];不起作用
则代码为:tableView.backgroundColor = [UIColor clearColor];就可以实现了

0 0
原创粉丝点击