gpt4 book ai didi

iphone - 关闭 UIImagePickerController

转载 作者:行者123 更新时间:2023-12-03 20:20:44 29 4
gpt4 key购买 nike

我有以下代码:

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?

最佳答案

您必须从 secondView 中的 UIImagePickerControllerDelegate 方法调用 imagePicker 上的以下内容。

例如:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
// process message
[imagePicker dismissModalViewControllerAnimated:YES];
}

关于iphone - 关闭 UIImagePickerController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1541199/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com