我的应用程序因以下错误而崩溃。
-[PreviewViewController applicationWillSuspend]: message sent to deallocated instance 0x1806d9e0
我的应用程序有两个 View Controller ,一个是 HomeViewController,另一个是 PreviewViewController。
在主视图 Controller 中,我正在显示一个 TableView 。选择表格 View 的行时,我将显示预览 View Controller 。
我选择了一行,然后显示了预览 View Controller 。
PreviewViewController *previewController = [[PreviewViewController alloc]initWithPreviewImage:[[kfxKEDImage alloc] initWithImage:imgCaptured] withSourceofCapture:_typeOfCapture typeOfDocumentCaptured:PHOTO]; [self presentViewController:previewController animated:YES completion:nil];
关闭了预览 View Controller 。
[self dismissViewControllerAnimated:YES completion:nil];
应用程序进入后台,然后它不会崩溃。
我依次选择了两行。应用程序进入后台然后崩溃。我不知道为什么会这样。如果有人知道解决方案,请告诉我。
提前致谢
最佳答案
我遇到了这个问题,这是由于有人覆盖了 UIViewController 类别中的“dealloc”造成的。
关于ios - -[PreviewViewController applicationWillSuspend] : message sent to deallocated instance 0x1806d9e0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25078617/