在向下滚动tableview时,表格视图控制器背景从表格到标题栏

时间:2014-01-30 04:59:03

标签: ios uitableview

我对用户点击桌面视图并向下滚动表格时屏幕上显示的背景有疑问。在我这样做的情况下,从桌子的顶部到标题栏出现了明亮的白色背景。我在属性检查器中搜索但没有发现任何可能改变此白色背景的内容。谢谢。

1 个答案:

答案 0 :(得分:0)

您可以使用以下代码

设置UITableView的背景颜色或图像
UIColor *backgroundColor = [UIColor colorWithRed:(229/255.f) green:(248/255.f) blue:(232/255.f) alpha:1.0f]; //For set Image [UIColor colorWithPatternImage:[UIImage imageNamed:@"tableBGImage.png"]];          
self.tblView.backgroundView = [[UIView alloc]initWithFrame:self.tblView.bounds];                     
self.tblView.backgroundView.backgroundColor = backgroundColor;