美文网首页
tableviewCell中modal延迟

tableviewCell中modal延迟

作者: ML_keyboard | 来源:发表于2018-01-06 17:11 被阅读0次

方式一:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

        CFRunLoopWakeUp(CFRunLoopGetCurrent()); // Fixes a bug where the main thread may be asleep, especially when using UITableViewCellSelectionStyleNone

            performSegue(withIdentifier: "identifier", sender: nil)

    }

方式二:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

     DispatchQueue.main.async {

            self.performSegue(withIdentifier: "DetailController", sender: nil)

        }

    }

链接参考资料

相关文章

网友评论

      本文标题:tableviewCell中modal延迟

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