
I wants to add a background image to uinavigationcontroller.

Use setBackgroundImage to to add a background image to uinavigationcontroller.
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"yourImage"] forBarMetrics:UIBarMetricsDefault];

You can also make a custom UINavigationController UIToolbar and set the Background Image to it as given belowâ?¦
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface MyToolbar : UIToolbar {}
- (void)drawRect:(CGRect)rect;
@end
//and in .m file
#import "MyToolbar.h"
@implementation MyToolbar
- (void)drawRect:(CGRect)rect {
backgroundImage = [UIImage imageNamed:@"my-awesome-toolbar-image.png"];
[backgroundImage drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.