我正在使用 ImageView 作为表格 View 单元格背景 View 。当我在 xcode 4.x 中编译我的源代码时,它工作正常,即在 iOS 6.x 和 7.0 中它工作正常。但是当我在 xcode 5.0 中编译我的源代码时,背景 ImageView 没有出现 iOS 7。
任何想法,为什么它不起作用? iOS 7 中的 uitableview 单元格背景 View 是否有任何限制?
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:accountProfileTypeCell];
UIImageView *cellBgView =[[UIImageView alloc]init];
[cellBgView setImage:[UIImage imageNamed:@"cellBgView.png"]];
[cell setBackgroundView:cellBgView];
}
最佳答案
尝试添加:cell.backgroundColor = [UIColor clearColor];
关于iphone - iOS 7 UItableview 单元格背景 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19064198/