Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/93.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UITableView所有单元格的背景图像_Ios_Uitableview_Xib - Fatal编程技术网

Ios UITableView所有单元格的背景图像

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

我想更改我的tableview背景图像。当我改变它时,改变不会影响细胞。我在我的单元中使用xib,它里面没有任何代码,只是设计。那么我该如何解决这个问题呢

    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()