Iphone return text button

Sorry for another newbie question.

I tried to get the text value of the back button in viewDidLoad, but when navigating the controllers, zero is always displayed.

NSLog(@"-----------> %@ ", self.navigationItem.backBarButtonItem.title);

How to get the text value of the button back?

+3
source share
1 answer

Using self.navigationController.navigationBar.backItem.title :)!

+5
source

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


All Articles