要改变UITableViewCell选中时的背景色,需要在
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)方法中添加如下代码:

// 设置cell选中的背景色
UIView *selectionColor = [[UIView alloc] init];
selectionColor.backgroundColor = [UIColor colorWithRed:(2/255.0)
                                                 green:(94/255.0)
                                                  blue:(130/255.0)
                                                 alpha:1];
cell.selectedBackgroundView = selectionColor;

即可。

相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-04-09
  • 2022-12-23
  • 2021-12-19
  • 2021-06-15
  • 2021-07-19
猜你喜欢
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
相关资源
相似解决方案