我有一个 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]];
Objective-c:
[self.yourTableView setBackgroundColor:[UIColor clearColor]];
Swift:
self.yourTableView.backgroundColor = .clear
XCode 7.0 错误。不从情节提要中选取
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)