keyWindow
is also deprecated in iOS 13 thus making me find another solution for this problem.
With the current updates with Swift 5.1, iOS 13, and Xcode 11 the code below when used creates the "card view" so users can easily swipe down and return to the previous view. Yet, the problem is that if a user logs in or logs out when using the code below the user can return to the login screen or main app after logging out which is problematic. What is the best way to segue users between storyboards or unconnected view controllers to where it does not create the "card view"? The problem with the "Work around solution" is that keyWindow
is deprecated. It works yet looking for a official solution.
Old way to segue between storyboards and unconnected view controllers
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Start")
self.present(vc, animated: true, completion: nil)
Work around solution
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "homeVC") as! UITabBarController
UIApplication.shared.keyWindow?.rootViewController = vc
If you really like the “old way” just keep using it but add a line setting the modalPresentationStyle
of vc
to .fullScreen
.