has*_*san 8 xcode objective-c uitableview ios ios9
我有一个UITableView,我想将其背景颜色设置为透明.表视图的背景颜色和界面构建器的所有子视图都设置为透明.它适用于iOS 8和7.但是,不是iOS 9.任何想法?
cellForRowAtIndexPath方法:
[cell setSelectedBackgroundView:[[UIView alloc] init]];
[cell.selectedBackgroundView setBackgroundColor:[UIColor clearColor]];
[cell setBackgroundColor:[UIColor clearColor]];
[cell.contentView setBackgroundColor:[UIColor clearColor]];
[cell setBackgroundView:[[UIView alloc] init]];
[cell.backgroundView setBackgroundColor:[UIColor clearColor]];
Run Code Online (Sandbox Code Playgroud)
Vip*_*617 10
Objective-C的:
[self.yourTableView setBackgroundColor:[UIColor clearColor]];
Run Code Online (Sandbox Code Playgroud)
迅速:
self.yourTableView.backgroundColor = .clear
Run Code Online (Sandbox Code Playgroud)
XCode 7.0错误.没有从Storyboard中获取
| 归档时间: |
|
| 查看次数: |
2643 次 |
| 最近记录: |