0
我在Main.storyboard中創建了一個UIViewController,我試圖從UIImagePickerController委託方法中以編程方式呈現它。但我收到的消息:UIViewController不從故事板呈現
Warning: Attempt to present <DAAnalysisViewController: 0x8b99960> on
<DAViewController: 0x8b35300> whose view is not in the window hierarchy!
代碼:
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info{
DAAnalysisViewController *asdf = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]
instantiateViewControllerWithIdentifier:@"1"];
[self presentViewController:asdf animated:YES completion:nil];
}
如何正確呈現從故事板一個UIViewController?
謝謝你,工作。我只是通過UIViewController編程指南試圖找出問題。 – Michael
完美答案:) –