我正在尝试获取UITableView滚动的UIView(如果启用了滚动)。通常情况下,背景是白色的,如果您将UITableView从边界中移出,则会看到背景。我试图将此背景设置为blackColor的UIColor。我似乎无法找到合适的标签。我在我的UIViewController中试过以下代码:找到UITableView滚动的UIView
- (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。
有什么想法?谢谢。
嘿罗杰,我不想让blackColor渗入我的UITableView。我想要它的正常样式。我只想看看表格滚动出界时的背景。 – Coocoo4Cocoa 2009-04-20 15:30:06