美文网首页
tableView中的cell,取消选中的颜色

tableView中的cell,取消选中的颜色

作者: 伊蕊飘零 | 来源:发表于2016-07-21 21:17 被阅读125次

取消选中cell的灰色

//取消选中cell的灰色的效果

//tableView 的代理方法
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}
或者
cell.selectionStyle = UITableViewCellSelectionStyleNone;

相关文章

网友评论

      本文标题:tableView中的cell,取消选中的颜色

      本文链接:https://www.haomeiwen.com/subject/okobjttx.html