HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ipad – UITableView背景颜色大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我看过UITableView for ios 4.2的各种背景颜色的帖子,但是我似乎无法改变背景颜色.

UIView *bgView = [[[UIView alloc] init] autorelease];
bgView.BACkgroundColor = [UIColor blackColor];
bgView.opaque = YES;
self.myTableView.BACkgroundView = bgView;

我把这个代码放在@L_801_1@viewDidLoad中,但它不会改变颜色.我的UITableView是@L_801_1@UIViewController中的@L_801_1@IBOutlet,它具有@L_801_1@UITableViewDelegate& UITableViewDatasource所以我想在viewDidLoad UITableView已经呈现,我不能改变其背景颜色.

编辑* – UITableView被分组

解决方法

尝试将表视图的背景视图设置为nil,并设置表视图的背景颜色

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view,typically from a nib.
    self.myTableView.BACkgroundView = nil;
    self.myTableView.BACkgroundColor = [UIColor blackColor];
}

大佬总结

以上是大佬教程为你收集整理的ipad – UITableView背景颜色全部内容,希望文章能够帮你解决ipad – UITableView背景颜色所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。