You can set the backGround image in the navigationBar . Using this
Insert didFinishLaunchingWithOptions
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"title_bar.png"] forBarMetrics:UIBarMetricsDefault];
Or you can set the image of the navigation bar in any view using
UINavigationBar *navBar = [[self navigationController] navigationBar]; UIImage *image = [UIImage imageNamed:@"TopBar.png"]; [navBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
Or you can set the view in your link navigation bar
[[UINavigationBar appearance] addSubview:yourView];
or
self.navigationItem.titleView = YourView;
And set the title using h
self.navigationItem.title = @"Your Title";
And you can get navigationBarButton using this
-(void)getRightBarBtn { UIButton *Btn =[UIButton buttonWithType:UIButtonTypeCustom]; [Btn setFrame:CGRectMake(0.0f,0.0f,68.0f,30.0f)]; [Btn setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"yourImage.png"]] forState:UIControlStateNormal];
And set a simple image in the navigation bar
UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"star.png"]]; UIBarButtonItem *backBarButton = [[UIBarButtonItem alloc] initWithCustomView:image]; self.navigationItem.rightBarButtonItem = backBarButton;
source share