美文网首页
iOS捕捉闪退处理Pushing the same view c

iOS捕捉闪退处理Pushing the same view c

作者: 玉思盈蝶 | 来源:发表于2020-06-11 21:17 被阅读0次

闪退信息如下:

image.png

push了一个相同的控制器导致的。

解决如下:

在push之前加判断,确定没有重复的实例再push操作!

 if (self.navigationController?.topViewController?.isKind(of: TableViewController.self))!{
                self.navigationController?.pushViewController(wordC, animated: true)
}else{
    NSLog("此处可能会报错")
}

参考链接:

https://www.jianshu.com/p/4760483a664e

相关文章

网友评论

      本文标题:iOS捕捉闪退处理Pushing the same view c

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