Here's a fragment of my Storyboard
:
As there is a NavigationController
at the very beginning, a default back button is displayed into each view controller and this is right. But I would like that back button not to be displayed in the Login
screen show and in the home one.
So in the LoginViewController
class I wrote this:
override func viewWillAppear(animated: Bool) {
self.navigationItem.setHidesBackButton(true, animated: true)
...
}
and it works perfectly. I did the same thing into HomeViewController
class:
override func viewWillAppear(animated: Bool) {
self.navigationItem.setHidesBackButton(true, animated: true)
...
}
but this won't work. In fact here's what I get:
and so there is a login back button. Why this? Any ideas?