UITableViewCell
属性: //设置右边的指示样式cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;//设置右边的指示控件 cell.accessoryView = [[UISwitch alloc] init];//设置cell的选中样式 cell.selectionStyle = UITableViewCellSelectionStyleNone;//设置背景色 cell.backgroundColor = [UIColor redColor];//设置背景viewUIView *bg = [[UIView alloc] init]; bg.backgroundColor = [UIColor blueColor]; cell.backgroundView = bg;//设置选中的背景view UIView *selectedBg = [[UIView alloc] init]; selectedBg.backgroundColor = [UIColor purpleColor]; cell.selectedBackgroundView = selectedBg; 性能优化: 思路:当滚动列表时,部分UITableViewCell会移出窗口