UITableView backgroud on Ipad

来源:互联网 发布:小志网络赚钱博客 编辑:程序博客网 时间:2024/05/21 21:42

How do I set the background color of an UITableView onIpad?


Grouped table views have a custom view inthe backgroundView property.This custom view is what displays the background. If you want tochange the background, you should create your own view and assignit there. In your case, you probably want something like thefollowing:

UIView *bgView = [[[UIView alloc] init] autorelease];bgView.backgroundColor = [UIColor blackColor];bgView.opaque = YES;self.myTableView.backgroundView = bgView;
Simply clearing the table view's background view before setting the table view's background color, provides the same result: self.myTableView.backgroundView = nil; self.myTableView.backgroundColor = [UIColor blackColor];
0 0
原创粉丝点击