草庐IT

Snapshotting

全部标签

swift 错误 : Snapshotting a view that has not been rendered results in an empty snapshot

我已经阅读了该网站上的许多帖子(尤其是:iOS8Snapshottingaviewthathasnotbeenrenderedresultsinanemptysnapshot),但没有针对Swift的答案。我想我会问这里的人群是否解决了这个问题。我在iPhone6上使用Xcode6.2、iOS8.2我的代码:ifUIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera){if(UIImagePickerController.isSourceTypeAvailable(UI

ios - UIImagePickerController 错误 : Snapshotting a view that has not been rendered results in an empty snapshot in iOS 7

我只在iOS7中遇到此错误并且应用程序崩溃了。在iOS6中,我从来没有收到任何错误,只有一次在打开相机时出现内存警告。Snapshottingaviewthathasnotbeenrenderedresultsinanemptysnapshot.Ensureyourviewhasbeenrenderedatleastoncebeforesnapshottingorsnapshotafterscreenupdates.这是我正在做的。imagePicker=[[UIImagePickerControlleralloc]init];[imagePickersetDelegate:self]

ios - Swift:尝试从我的应用程序在 Safari 中打开 URL 时出现 'Snapshotting a view that has not been rendered..' 错误

我的应用程序的规范之一是,在点击tableView单元格时,用户将被重定向到与该单元格关联的网站。这是代码:overridefunctableView(tableView:UITableView,didSelectRowAtIndexPathindexPath:NSIndexPath){ifleturl=NSURL(string:appdelegate.studentInfo[indexPath.row].url){tableView.deselectRowAtIndexPath(indexPath,animated:true)UIApplication.sharedApplicati