Search code examples
iosswiftuiviewcontrolleruinavigationcontrolleruikit

How to not present View Controller Modally


enter image description herephI am trying to present a home screen when user logs in (or has previously logged in). The home screen is being displayed, but modally. How do I display it normally?

Example:

        if UserDefaults.standard.string(forKey: "appleAuthorizedUserIdKey") != nil {
                // move to main view
            performSegue(withIdentifier: "LogIn", sender: nil)

And the segue kind is set to 'show' in storyboard. Thanks.


Solution

  • You controller from where you are performing segue needs to be embed in UINavigationController to show it Normally otherwise it will show it modally