简体   繁体   中英

Disable cell interaction while showing the selection indicator

Tried using [self.myTableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; to make the cell show the selection indicator, but once I add cell.userInteractionEnabled = NO; , the selection indicator stops showing. Is there a way to make the cell look selected, grayed out, and doesn't respond to taps?

将此行放在下面:cellForRowAtIndexPath。

    cell.selectionStyle = UITableViewCellSelectionStyleNone;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM