在iOS 6中
当表格样式为UITableViewStyleGrouped时,[uitableview setBackgroundColor:]不设置颜色
而是看到默认的条纹背景.
如果样式是UITableViewStyleGrouped,我们应该如何设置表的背景
Far*_*jes 19
设置
[tableView setBackgroundView: nil];
Run Code Online (Sandbox Code Playgroud)
在iOS 5中给我带来问题所以我使用的是:
UIView* bview = [[UIView alloc] init];
bview.backgroundColor = [UIColor yellowColor];
[tableView setBackgroundView:bview];
Run Code Online (Sandbox Code Playgroud)
iOS 5和6兼容!
self.view.backgroundColor = TTSTYLEVAR(mainPageBackground);
self.tableView.separatorColor = TTSTYLEVAR(mainPageBackground);
self.tableView.backgroundView = nil;
Run Code Online (Sandbox Code Playgroud)
为我修好了.你必须要小心这可能带来的其他影响.
| 归档时间: |
|
| 查看次数: |
12242 次 |
| 最近记录: |