我只在 iOS 7 中收到此错误并且应用程序崩溃了。在 iOS 6 中,我从来没有收到任何错误,只有一次打开相机时出现内存警告。
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
这就是我正在做的事情。
imagePicker = [[UIImagePickerController alloc] init];
[imagePicker setDelegate:self];
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
[imagePicker setAllowsEditing:YES];
[self presentModalViewController:imagePicker animated:YES];
我确实试图延迟presentModalViewController
,但我仍然收到相同的消息。几秒钟后(7-10),应用程序崩溃了。
此错误仅出现在 iOS 7 中。
有人有线索吗?