设置cell背景色和选中色

1 // 设置cell的背景色
2 UIView *bg = [[[UIView alloc] init] autorelease];
3 bg.backgroundColor = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1];
4 cell.backgroundView = bg;
1 // 设置cell选中的背景
2 UIView *selectdBg = [[[UIView alloc] init] autorelease];
3 selectdBg.backgroundColor = [UIColor colorWithRed:0.85 green:0.85 blue:0.85 alpha:1];
4 cell.selectedBackgroundView = selectdBg;

 

 
posted @ 2013-08-03 14:07  wangzhenxiang  阅读(324)  评论(0编辑  收藏  举报