I have a viewcontroller, and I would like to display a modal view controller with : presentModalViewController when a user finished picking an image.
The modal view controller is working fine when I call it from a button in my main view. B开发者_高级运维ut when I call it from didfinishpickingimage callback nothing happens.
Thanks.
Try
[picker dismissModalViewControllerAnimated:NO];
before
[self presentModalViewController:MY_VIEW_CONTROLLER animated:YES];
Note the animated variable
I had a similar issue. I decided to push the view controller I wanted to display after selecting an image onto my navigation controller instead of trying to present a modal view controller. It has the same effect as presenting a modal.
So I just did:
[self.navigationController pushViewController:MY_VIEW_CONTROLLER animated:YES];
精彩评论