美文网首页
UITableviewcell 点击present vc 延时

UITableviewcell 点击present vc 延时

作者: 喵喵粉 | 来源:发表于2020-04-16 12:01 被阅读0次

现象:
点击cell 调用present(vc, animated: true, completion: nil)弹窗出现延时或者没反应,但是触摸UI时就会弹窗

cell设置了selectionStyle = .none

方法:

  1. didSelectRowAt中调用deselectRow

或者

  1. 主线程异步弹窗
DispatchQueue.main.async {
    present(vc, animated: true, completion: nil)
}

相关文章

网友评论

      本文标题:UITableviewcell 点击present vc 延时

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