我仅在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中出现。
有人知道吗?