ios - Trouble changing background image of navigationbar back button -


this question has answer here:

i believe have tried other solutions matter.

i use following code change background image of navigationbar backbutton.

uiimage *image = [uiimage imagenamed:@"standard_bt.png"];         [[uibarbuttonitem appearance] setbackbuttonbackgroundimage:image forstate:uicontrolstatenormal barmetrics:uibarmetricsdefault]; 

this makes button appear this:

enter image description here

without code, appears this:

enter image description here

now, background image first picture, backbutton shape of second picture.

note: achieve without having modify image named "standard_bt.png"

how do that? possible?

you have done right thing.

ios sdk doesn't provide convenience method change shape of uiimage object according standard backbutton's shape.

that said, answer is: no, can not realize shaped backbutton customization without changing button's background image itself.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -