如果启用了滚动,我正在尝试获取 UITableView 滚动的 UIView。通常,背景是白色的,如果你将 UITableView 推出它的边界,你会看到一个背景。我正在尝试将此背景设置为 blackColor 的 UIColor。我似乎找不到合适的标签。我在 UIViewController 中尝试了以下代码:
- (void)loadView
{
[super loadView];
UITableView *aTableView =
[[[UITableView alloc]
initWithFrame:self.view.bounds
style:UITableViewStylePlain] autorelease];
[aTableView setScrollEnabled:YES];
[self.view setBackgroundColor:[UIColor blackColor]];
[self.view addSubview:aTableView];
self.tableView = aTableView;
}
颜色仍然保持白色。似乎我打错了 UIView。
任何想法?谢谢。