UITableViewcell选中后怎么去掉背景灰色
- 作者: 遥遥无期74696531
- 来源: 51数据库
- 2022-08-17
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
在这个函数里写上cell.selectionStyle = UITableViewCellSelectionStyleNone;就ok了
推荐阅读
