I made a custom UIAlertController in the upper part of it is I UICollectionView with photos. I present TOCropViewController (this is UIViewController) of a custom from my UIAlertController, and when I'm TOCropViewController, the UIAlertController be in the wrong position. Also, I did a little experiment to find out exactly what the problem is not TOCropViewController, and presented a default UIViewController, but the result is the same. Please tell me how to fix it?
So I present any controller from 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)
    }
}
this give the same result
  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)
                })
            })
        }
When the controller which was presented the result of such a hiding.
