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:
the image i'm using not blue circle, here settings , object structure:
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
Post a Comment