custom UITableViewCell selected Color
更新:HHH   时间:2023-1-7


定制UITableView 中UITableViewCell点击颜色:


   self.selectionStyle  = UITableViewCellSelectionStyleDefault;

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

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

   self.selectedBackgroundView = selectedBackgroundView;


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



返回开发技术教程...