When using pushViewController
to push UIImagePickerController
:
[self.navigationController pushViewController:pvc animated:YES];
an error will occur such as:
Pushing a navigation controller is not supported
The right solution is to use presentModalViewController
:
[self presentModalViewController:pvc animated:YES];
Can someone explain why this is necessary? What‘s hidden in UIViewController
?
Thanks!