UITableView 自定义选中Cell颜色

 cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame];
 cell.selectedBackgroundView.backgroundColor = [UIColor whiteColor];

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// 如果需要保持选中状态注释代码即可 [_tableView deselectRowAtIndexPath:indexPath animated:YES]; }

 

posted @ 2014-08-06 09:35  菜鸟程序猿  阅读(140)  评论(0)    收藏  举报