jeudi 4 décembre 2014

Way to check what UIBarButtonItem text is?

I'm working on an app that has a nav bar and, the "back" button changes to "upgrade" on certain screens. In the app delegate (didFinishLaunchingWithOptions) I added some code to get rid of the "back" text and just keep the < arrow by changing the font size to 0.1. That worked, but it hid the text for "upgrade". All I have to do is throw an if statement around that code to check if the UIBarButtonItem's text is equal to @"Back", but i'm not sure what to use.



if ([UIBarButtonItem Title] == @"Back")
{
// Code
}


Thanks for any help




Aucun commentaire:

Enregistrer un commentaire