iOS Tableable cell 自定義點選背景效果
//先設定背景色
_backImgView = [[UIImageViewalloc]initWithFrame:CGRectMake(20 * KSCALE_X, 0, IPHONE_WIDTH - 40 * KSCALE_X, self.frame.size.height)];
_backImgView.backgroundColor = kColor(231, 231, 231);
_backImgView = [[UIImageViewalloc]initWithImage:[CommonToolscreateImageWithColor:kColor(231, 231, 231)]
[self.contentViewaddSubview:_backImgView];
//設定高度_backImgView.frame = CGRectMake(20 * KSCALE_X, 0, IPHONE_WIDTH - 40 * KSCALE_X, _speciaView.frame.size.height + _speciaView.frame.origin.y + 10);
-(UITableViewCell *)tableView:(
UIView *view_bg = [[UIViewalloc]initWithFrame:cell.frame];
view_bg.backgroundColor = [UIColorclearColor];
cell.selectedBackgroundView = view_bg;
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(
DSLog(@"點選社群詳情 cell");
//當離開某行時,讓某行的選中狀態消失
[tableView deselectRowAtIndexPath:indexPath animated:NO];
}