[Code Note] custom navigation bar color and note custom navigation bar
I ,.
2. Engineering Drawing.
3. Code.
AppDelegate. m
-(BOOL) application :( UIApplication *) application didfinishlaunchingwitexceptions :( NSDictionary *) launchOptions {self. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]; // Override point for customization after application launch. rootViewController * rootVC = [[RootViewController alloc] init]; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: rootVC]; // UIBarMetricsDefault: Use vertical bars (take mobile phones) UINavigationBar standard size to display UINavigationBar. // UIBarMetricsLandscapePhone: displays the UINavigationBar [nav. navigationBar setBackgroundImage: [UIImage imageNamed: @ "1.jpg"] forBarMetrics: UIBarMetricsDefault]; self. window. rootViewController = nav; self. window. backgroundColor = [UIColor whiteColor]; [self. window makeKeyAndVisible]; return YES ;}