我在其上方制作了一个自定义UIAlertController
,我UICollectionView
带有照片。我从TOCropViewController
提出自定义UIViewController
(这是UIAlertController
),当我TOCropViewController
时,UIAlertController
出错位置。另外,我做了一些实验,以确切地找出问题不是TOCropViewController
,并提供了默认的UIViewController
,但结果是一样的。请告诉我如何解决它?
所以我提出来自UIAlertController
private func presentCropViewController(_ image: UIImage) {
let cropViewController = TOCropViewController(croppingStyle: .circular, image: image)
DispatchQueue.main.async { [weak self] in
self?.present(cropViewController, animated: true, completion: nil)
}
}
这给出了相同的结果
let testVC = UIViewController()
testVC.view.backgroundColor = .red
DispatchQueue.main.async { [weak self] in
self?.present(testVC, animated: true, completion: {
Timer.scheduledTimer(withTimeInterval: 5, repeats: false, block: { (timer) in
testVC.dismiss(animated: true, completion: nil)
})
})
}
当控制器出现这种隐藏的结果时。