所以我在iOS 7.1中测试了它,它运行正常.我正在使用下面的行设置背景颜色以清除我的tableview.
self.tableview = [[UITableView alloc]initWithFrame:self.bounds style:UITableViewStylePlain];
self.tableview.delegate = self;
self.tableview.dataSource = self;
self.tableview.backgroundView = nil;
self.tableview.backgroundColor = [UIColor clearColor];
self.tableview.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
[self addSubview:self.tableview];
Run Code Online (Sandbox Code Playgroud)
我还将tableFooterView设置为一个新视图,以隐藏任何剩余未使用的单元格.
self.tableview.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
Run Code Online (Sandbox Code Playgroud)
这在iOS 7上运行得非常好,但在iOS 8中,我在桌面视图下留下了白色背景颜色.tableview坐在里面的superview也有一个清晰的背景颜色.有任何想法吗?
下面添加了图片 - 我不得不模糊客户名称
在iOS 7上工作
不适用于iOS 8.1