Dato' Mohammad Nurdin Dato' Mohammad Nurdin - 2 years ago 231
Swift Question

Swift - How to hide back button in navigation item?

Right now I have two view controllers. My problem is I don't know how to hide back button after change into second view controller. Mostly references that I found in objective-C. How I code it in swift?

Hide back button code in objective-c

[self.navigationItem setHidesBackButton:YES animated:YES];

Answer Source

Straight from the UINavigationItem class reference documentation -

self.navigationItem.setHidesBackButton(true, animated:true);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download