I have a Login page and if the login is successful the user is taken to a landing viewController(VC). I have a navigationController. I pop the login VC and push in the landing VC. The problem I am having is that the login VC persists in the stack as indicated by the left button on the navigation controller which navigates you back to the login page. How do I remove the login VC copletely from the stack so that the navigation controller can not navigate a user back to it once they have logged in?
self.navigationController?.popViewController(animated: true)
let landingPage = self.storyboard?.instantiateViewController(withIdentifier: "landingPage") as!
LandingViewController
self.navigationController?.pushViewController(landingPage, animated: true)