Ios UITableView所有单元格的背景图像
我想更改我的tableview背景图像。当我改变它时,改变不会影响细胞。我在我的单元中使用xib,它里面没有任何代码,只是设计。那么我该如何解决这个问题呢Ios UITableView所有单元格的背景图像,ios,uitableview,xib,Ios,Uitableview,Xib,我想更改我的tableview背景图像。当我改变它时,改变不会影响细胞。我在我的单元中使用xib,它里面没有任何代码,只是设计。那么我该如何解决这个问题呢 self.list.backgroundView = [[UIImageView alloc] initWithImage: [UIImage imageNamed:@"Pattern.png"]]; 在您的cellForRowAtIndexPath方法中,将单元格的背景色设置
self.list.backgroundView = [[UIImageView alloc] initWithImage:
[UIImage imageNamed:@"Pattern.png"]];
在您的
cellForRowAtIndexPath
方法中,将单元格的背景色设置为“透明色”。它将使你的细胞透明,并显示背景图像
目标C:
cell.backgroundColor = [UIColor clearColor];
cell.backgroundColor = UIColor.clearColor()
Swift:
cell.backgroundColor = [UIColor clearColor];
cell.backgroundColor = UIColor.clearColor()
在
cellforrowatinexpath
方法中,将单元格的背景色设置为“透明色”。它将使你的细胞透明,并显示背景图像
目标C:
cell.backgroundColor = [UIColor clearColor];
cell.backgroundColor = UIColor.clearColor()
Swift:
cell.backgroundColor = [UIColor clearColor];
cell.backgroundColor = UIColor.clearColor()