我一直在尝试创建一个具有清晰背景的分组 UItableView。但由于某种原因,这些部分仍然具有浅灰色。我试图将 backgroundview 设置为 nil,但它不起作用。我还尝试将 backgroundView 设置为具有 clearColor 的视图,但也没有用。不知道我在这里做错了什么。
// make table's background clear
[self.myTable setBackgroundView:nil];
[self.myTable setBackgroundView:[[[UIView alloc] init] autorelease]];
UIView *bgView = [[UIView alloc] initWithFrame:self.myTable.frame];
bgView.backgroundColor = [UIColor clearColor];
self.myTable.backgroundView = bgView;
[bgView release];