When running the App on iOS 13 beta 6, using Xcode 11 beta 5 I\'m encountering the strange gap when presenting search results view controller:
Here\'s a bit o
Using .asyncAfter(deadline: .now() + 0.1)
will cause a glitch in the UI. To get rid of that, get rid of the deadline! Using DispatchQueue.main.async
is enough.
extension UISearchController {
open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if let presentingVC = self.presentingViewController {
DispatchQueue.main.async {
self.view.frame = presentingVC.view.frame
}
}
}
}