gpt4 book ai didi

ios - 关闭模态视图 Controller 在(iOS13.5 Xcode 11.5)中显示黑屏

转载 作者:行者123 更新时间:2023-12-01 21:46:08 40 4
gpt4 key购买 nike

let cropViewController = CropViewController(image: images[0])
cropViewController.delegate = self

self.present(cropViewController, animated: true, completion: nil)

从委托(delegate)方法中关闭此 View Controller ,显示黑屏
func cropViewController(_ cropViewController: CropViewController,
didCropToImage image: UIImage,
withRect cropRect: CGRect,
angle: Int) {
// 'image' is the newly cropped version of the original image
cropViewController.dismiss(animated: true, completion: {
self.setImageAndReloadRow(image: image)
})

}

Xcode 11.5 和 iOS13.5

最佳答案

选择图像并裁剪后我也遇到了同样的问题,只有黑屏出现。
代替

cropViewController.dismiss(animated: true, completion: nil).
let viewController = cropViewController.children.first! 
viewController.modalTransitionStyle = .coverVertical
viewController.presentingViewController?.dismiss(animated: true, completion: nil)

关于ios - 关闭模态视图 Controller 在(iOS13.5 Xcode 11.5)中显示黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62194369/

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