I added a navigation control to switch between views in my app. But some of the views shouldn't have 'Back' (the previous title) button. Any ideas about how to hide the back button?
Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.
Yes, the back button can be disabled. Please navigate to Advanced Website Kiosk Settings–>Navigation–>Disable back button. Kindly enable this restriction to disallow the usage of the back button on the iOS device.
Go to Settings > Accessibility > Guided Access and toggle on Guided Access. Open an app and triple-click the Power button to enter Guided Access. There's no other way to get rid of the Home Bar.
In swift 4 I has a trick to show / hide right or left button: Step 1: Create a IBOutlet button in view controller: @IBOutlet var navigationItemButton: UIBarButtonItem! Step 4: Just call the functions that you want, use hideNavigationButton() to hide, and showNavigationButton() to show the button.
Objective-C:self.navigationItem.hidesBackButton = YES;
Swift:navigationItem.hidesBackButton = true
The best way is to combine these, so it will hide the back button even if you set it up manually :
self.navigationItem.leftBarButtonItem=nil; self.navigationItem.hidesBackButton=YES;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With