[英]change table view's cell selection color
我们是否可以更改表格视图的选择颜色,即单元格,默认情况下为蓝色,那么我们可以将其更改为任何其他颜色吗?
问候
不需要图像文件的另一种方法是:
UIView *bgView = [[UIView alloc] init];
// At least on iOS6 you don't to size the view for this to work.
bgView.backgroundColor = [UIColor grayColor];
aCell.selectedBackgroundView = bgView;
这种方式在代码中
aCell.selectedBackgroundView = [[[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"selectedBackground.png"]] autorelease];
或者您可以在“界面生成器”中将其设置为灰色,我认为蓝色和灰色就是全部可用而无需创建be视图
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.