1
votes

enter image description here

I want change other UIBarButtonItem. but, retain buttonItemStyle...

I want the original buttonItemStyle... only change inner content

How make BackBarButtonItemStlye?

UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"section" style:<??? what is style?> target:self action:@selector(popView:)];

how i get the image button style?

plz.. help ^^

I never find this style.

api only support below style... not backbuttonstyle...

UIBarButtonItemStylePlain,UIBarButtonItemStyleBordered,UIBarButtonItemStyleDone,

[self navigationItem] setBackBarButtonItem:backBarButtonItem]; is Not Want...

[self navigationItem] setLeftBarButtonItem:backBarButtonItem]; is Want..

because my custom buttonItem target, action is not nil...

my buttonItem is change custom item...

setBackBarButtonItem is only use default Action (now ViewController pop)

setLeftBarButtonItem is use any custom action

ex:

[ self navigationController] popToRootViewController];
[[self navigationController] popToViewController:[[[self navigationController] viewControllers] objectAtIndex:2] animated:YES];

big issue is not supported cocoa API backBarButtonItemStyle(image refrence)...

how to solve this problem?

only draw a illustrator backBarButtonItemStyle image?

2

2 Answers

0
votes

You need to change the backBarButtonItem of the parent view controller. Use UIBarButtonItemStylePlain as a style and UIKit will automatically use the back appearance.

0
votes

This style is not customizable. You need to create the bar button with some image that looks like the back button.