关闭 UIImagePickerController
我有以下代码:
SecondViewController *secondView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
[imagePicker setCameraOverlayView:secondView.view];
[imagePicker setShowsCameraControls:NO];
[self presentModalViewController:imagePicker animated:YES];
我的问题是: 如何从“SecondViewController”中关闭 ModalViewController?
I have the following code:
SecondViewController *secondView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
[imagePicker setCameraOverlayView:secondView.view];
[imagePicker setShowsCameraControls:NO];
[self presentModalViewController:imagePicker animated:YES];
My question is: How can I dismiss the ModalViewController from "SecondViewController"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须从
secondView
中的UIImagePickerControllerDelegate
方法调用imagePicker
上的以下内容。例如:
You must call the following on
imagePicker
from aUIImagePickerControllerDelegate
method insecondView
.For example:
接受的答案在 iOS7 中不再有效。下面是应该使用的方法。
同样,应该从
UIImagePickerControllerDelegate
在UIImagePicker
上调用此方法。The accepted answer no longer works in iOS7. Below is the method which should be used instead.
Again, this method should be called on the
UIImagePicker
from theUIImagePickerControllerDelegate
.