In iOS 13 there is a new behaviour for modal view controller when being presented.
Now it\'s not fullscreen by default and when I try to slide down, the app just dis
The above answers and suggestions are right, below is another version, and efficient way using programmatically.
#1 Created a UIView Extension
#2 Created a Method ()
//#1
extension UIViewController {
//#2
func presentLocal(_ viewControllerToPresent: UIViewController, animated flag:
Bool, completion: (() -> Void)? = nil) {
//Reusing below 2 lines :-)
viewControllerToPresent.modalPresentationStyle = .overCurrentContext
self.present(viewControllerToPresent, animated: flag, completion: completion)
}
}
Invoking as below
let vc = MyViewController()
let nc = UINavigationController(rootViewController: vc)
sourceView.presentLocal(nc, animated: true, completion: nil)
OR
let vc = MyViewController()
sourceView.presentLocal(vc, animated: true, completion: nil)