NavigationBar

Use an Image as NavigationBar Title

While working on my latest development project. The client wanted to have thier logo as the title of the NavigationBar. After some searching I found this code. It works well and is simple to understand.

UIImageView *image=[[UIImageView alloc]initWithFrame:CGRectMake(0,0,70,45)] ;
[image setImage:[UIImage imageNamed:@"Discount_Image.png"]];
[self.navigationController.navigationBar.topItem setTitleView:image];

Syndicate content