定制UITableView 中UITableViewCell点击颜色:


   self.selectionStyle  = UITableViewCellSelectionStyleDefault;

   UIView *selectedBackgroundView = [[UIView alloc] init]; 

   selectedBackgroundView.backgroundColor = [UIColor colorWithHexString:@"#efefef"];

   self.selectedBackgroundView = selectedBackgroundView;


特别注意此时selectionStyle的属性不能设置为:self.selectionStyle  = UITableViewCellSeparatorStyleNone