After pushViewController, how to disable backBarButtonItem?

After pushViewController, how to disable backBarButtonItem so that return will not be possible?

+3
source share
3 answers

navigationItem.hidesBackButton = YES

+16
source

if you are using a storyboard, click on “Navigation” and add the path “hidesBackButton” to the Key Path attribute tag.

enter image description here

+1
source

, :

[self.navigationController setNavigationBarHidden: YES animated:YES]; 
-2

Source: https://habr.com/ru/post/1723027/


All Articles