设置cell默认和被选中时的背景色

//设置cell被选中的背景色

UIView *view = [[[UIView alloc] init] autorelease];

view.backgroundColor = [UIColor blueColor];

cell.selectedBackgroundView = view;

//设置cell默认的背景色

UIView *view = [[[UIView alloc] init] autorelease];

view.backgroundColor = [UIColor blackColor];

cell.backgroundView = view;

//清除文本标签的背景色

cell.textLabel.backgroundColor = [UIColor clearColor];

cell.detailTextLabel.backgroundColor = [UIColor clearColor];

//TableView的分隔线

tableView.separatorColor= [UIColor clearColor];

 

posted @ 2013-05-08 18:24  wangzhenxiang  阅读(175)  评论(0编辑  收藏  举报