A UIButton has a currentTitle-property and you should be able to get the title from that.
A UIBarButtonItem has a possibleTitles-property which is an NSSet containing all possible titles the bar button might have. If it is simply one then you might retrieve this title by the following function:
NSString *buttontitle = [myBarButtonItem.possibleTitles anyObject];
if it contains more then first transform it to an array and then retrieve the title you need:
NSArray *titlesArray = [myBarButtonItem.possibleTitles allObjects];
if you know what title it might contain you might want to use this:
Bool *expectedTitleFound = [myBarButtonItem.possibleTitles contains:@"MyTitle"];
Hope this helps. Good luck.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…