2

I'm having some trouble going from my login VC which is a collectionVC to my main vc which is a navigation controller. No matter what type of segue I choose, i get this gap at the top where you can see the previous login VC, with the possibility to drag from the top of the current navigationVC to dismiss it. I've tried using all the different segues but they all show up like this for some reason. My loginVC has a login button, and changes to the navigation VC with the following code:

// Login user
func loginUser() {
    Auth.auth().signIn(withEmail: emailTxtFld.text!, password: PasswrdTxtFld.text!) { (user, error) in
        if error != nil {
            print(error!)
        } else {
            print("Login succesfull!")
            self.performSegue(withIdentifier: "goToMain", sender: self)
        }
    }
}

@IBAction func loginBtnTapped(_ sender: Any) {
    loginUser()
}

I've connected the loginVC to the main VC with a segue, not the login button itself. The first slide of the navigation VC is a collectionview, the second is blank.

codeski
  • 153
  • 7

2 Answers2

2

This is not a problem of segue, it is a problem with the ModalPresentationStyle of the presented view controller that, from iOS 13, defaults to automatic. This means that (most of the) view controllers will be presented in this fashion.

You just need to set this modal presentation style to fullscreen in one of this points:

Enricoza
  • 1,101
  • 6
  • 18
2

Thank you Enricoza for explaining this to me. Since I made a segue using the storyboard I was able to make the segue full screen by following the seccond answer in this post: Presenting modal in iOS 13 fullscreen

codeski
  • 153
  • 7