我有一个具有背景图像的uiTableViewController。我正在为TableView设置图像,如下所示:
[self.view setBackgroundColor: [UIColor colorWithPatternImage:
[UIImage imageWithContentsOfFile:
[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:
@"background1.jpg"]]]];
问题是,我的每个自定义TableView单元格都会得到相同的背景图像——在每个单元格中都会重复。作为测试,我尝试用0.0的alpha使我的单元格中的所有内容透明化,但即使这样,虽然我看不到每个单元格中的任何标签,但我仍然看到每个单元格中重复的背景图像:
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
cell.contentView.alpha = 0.0;
cell.alpha = 0.0;
对于如何让我的表的背景图像停止在每个单元格中重复的任何建议都将不胜感激!