开发者

modal view not showing inside didfinishpickingimage

开发者 https://www.devze.com 2022-12-08 07:52 出处:网络
I have a viewcontroller, and I would like to display a modal view controller with : presentModalViewController when a user finished picking an image.

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号