missModalViewControllerAnimated 也会关闭调用它的视图控制器
我有一个视图控制器,它在委托启动时呈现为模式视图控制器。该视图控制器可以选择使用 UIImagePickerController 选择图像,该图像使用 presentModalViewControllerAnimated
呈现。之后,我实现该
imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
方法并对其调用 dismissModalViewControllerAnimated
,但这会解除两个模式视图控制器。当第二个视图控制器关闭时,我似乎无法保持第一个视图控制器打开。
I've got a view controller which is presented as a modal view controller on startup by the delegate. This view controller has an option to select an image using a UIImagePickerController which is presented using presentModalViewControllerAnimated
. After this I implement the
imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
method and call dismissModalViewControllerAnimated
on it, but this dismisses both of the modal view controllers. I can't seem to keep the first view controller open when the second is closed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你在给谁打电话dismissModalViewControllerAnimated?您想在呈现要关闭的模态视图的视图控制器上调用它。
Who are you calling dismissModalViewControllerAnimated on? You want to call it on the view controller that presented the modal view you want to dismiss.