您好我更改了UITableView背景颜色,刷新控制器消失了。
这是更改表格背景的代码:
UIView *bview = [[UIView alloc] init];
bview.backgroundColor = [UIColor blackColor];
[self.tableView setBackgroundView:bview];
这是我拉动刷新时间
// Initialize the refresh control.
self.refreshControl = [[UIRefreshControl alloc] init];
self.refreshControl.backgroundColor = [UIColor whiteColor];
self.refreshControl.tintColor = [UIColor redColor];
[self.refreshControl addTarget:self
action:@selector(retrieveData)
forControlEvents:UIControlEventValueChanged];
self.tableView.alwaysBounceVertical = YES;
答案 0 :(得分:0)
不要设置背景视图属性,只需这样做。
// Set table view background color
self.tableView.backgroundColor = [UIColor blackColor];
// Initialize the refresh control
self.refreshControl = [[UIRefreshControl alloc] init];
self.refreshControl.backgroundColor = [UIColor blackColor];
self.refreshControl.tintColor = [UIColor redColor];
[self.refreshControl addTarget:self
action:@selector(retrieveData)
forControlEvents:UIControlEventValueChanged];
self.tableView.alwaysBounceVertical = YES;
答案 1 :(得分:0)
我找到的答案是更改scrollView外观
[[UIScrollView appearance] setBackgroundColor:[UIColor blackColor]];