UIAlertController在cell中弹出延迟

2018-08-07  本文已影响8人  倪大头

转自:https://www.jianshu.com/p/fed4cc7c8c94

习惯用UITableViewCellSelectionStyleNone这种方式把cell的点击效果关掉,但在加了这个属性后didSelectRowAtIndexPath中的UIAlertController弹出时反应迟钝,把UITableViewCellSelectionStyleNone去掉用[tableView deselectRowAtIndexPath:indexPath animated:YES];这种方式处理点击效果就好了,或者把UIAlertController放在主线程中执行

上一篇 下一篇

猜你喜欢

热点阅读