gpt4 book ai didi

选择图像后快速图像选择器不关闭

转载 作者:可可西里 更新时间:2023-11-01 00:24:31 27 4
gpt4 key购买 nike

我可以打开图像库并选择图像,但是当我选择图像时,取消部分的选择不会关闭。我错过了什么吗?

func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {

var imagePickerController = UIImagePickerController()
imagePickerController.delegate = self
imagePickerController.sourceType = UIImagePickerControllerSourceType.SavedPhotosAlbum
imagePickerController.allowsEditing = true
self.presentViewController(imagePickerController, animated: true, completion: { imageP in

})
}


func imagePickerController(picker: UIImagePickerController!, didFinishPickingImage image: UIImage!, editingInfo: NSDictionary!) {
let selectedImage : UIImage = image
println(selectedImage)
}

最佳答案

你需要关闭 View Controller

func imagePickerController(picker: UIImagePickerController!, didFinishPickingImage image: UIImage!, editingInfo: NSDictionary!) {
let selectedImage : UIImage = image
println(selectedImage)
self.dismissViewControllerAnimated(true, completion: nil)

关于选择图像后快速图像选择器不关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25002027/

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