Reputation: 2491
Code:
self.navigationItem.setHidesBackButton(true, animated: false)
Back button is not getting hidden.
Also tried:
self.navigationController!.navigationItem.setHidesBackButton(true, animated: false)
in the viewDidLoad()
method. But it is not working. Why does this not work?
Upvotes: 0
Views: 221
Reputation: 1679
Try this, it works for me:
self.navigationItem.leftBarButtonItem = nil
self.navigationItem.setHidesBackButton(true, animated: false)
Hope this helps.
Upvotes: 2