I know that we can hide navigation bar "back" button. But I dont whant to hide it ! Is there any way to make it just not clickable ?
The cause of this annoying back button bug is down to Accessibility text settings. Check your settings to see if your iPhone text is enlarged or in bold. Turn those features off as we show you below and see if it fixed the problem for you.
Check that you have the latest version of iOS on your iPhone 8 or later. Go to Settings > Accessibility > Touch, and tap Back Tap. Tap Double Tap or Triple Tap and choose an action. Double or triple tap on the back of your iPhone to trigger the action you set.
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.
You can not disable the backBarButtonItem. Setting enabled property of backBarButtonItem to NO doesn't actually disables it.
It seems Apple prevented others("us") from disabling backBarButtonItem, even it ignores the target and action set to backBarButtonItem.
try this
self.navigationItem.leftBarButtonItem.enabled=NO;
self.navigationItem.backBarButtonItem.enabled=NO;
Update:
It seems to be Apple doesn't allow the back button to enable / disable. Instead of that we can hide it.
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