ios - Setting navigation bar item image in storyboard does not work -


i'm trying set navigation bar item through storyboard custom image , not work.

this result:

enter image description here

the image i'm using not blue circle, here settings , object structure:

enter image description here

enter image description here

the image has appropriate size , have tried multiple images same result.

this because navigation bar treats it's images templates , display them applying standard tint color.

to display image in it's original form need use uiimagerenderingmodealwaysoriginal rendering mode of image.

you can set in viewdidload method of uiviewcontroller

- (void)viewdidload {      uibarbuttonitem* rightbutton = self.navigationitem.rightbarbuttonitem;     [rightbutton setimage:[[uiimage imagenamed:@"imagename"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]]; } 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -