gpt4 book ai didi

ios - 关闭 UIImagePicker

转载 作者:行者123 更新时间:2023-11-30 13:29:55 24 4
gpt4 key购买 nike

我正在使用以下方法关闭我的 UIImagePicker:

func imagePickerControllerDidCancel(picker: UIImagePickerController!)
{
picker.dismissViewControllerAnimated(true, completion: nil)
}

不幸的是,这也忽略了下面的 View 。我不希望这种事发生。

我已经像这样加载了 UIImagePicker:

let imagePicker: UIImagePickerController! = UIImagePickerController()


@IBAction func uploadFromAlbumButton(sender : UIButton){
let picker = UIImagePickerController()
picker.allowsEditing = true
picker.delegate = self
presentViewController(picker, animated: true, completion: nil)
}

UIImagePicker 下面的 View 显示如下:

let newViewController = FulfilWishViewController();
newViewController.delegate = self
navigationController?.pushViewController(newViewController, animated: true)

最佳答案

请检查您是否在 viewwillappear() 中执行了任何代码。因为在关闭 UIImagepickerController 后,它会调用父 Controller 的 viewwillappear() 。

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

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