myViewController *myv=[[myViewController alloc]init];
//创建导航控制器并且添加根视图
UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:myv];
self.window.rootViewController=nav;
[self.window makeKeyAndVisible];
//给window设置背景色
self.window.backgroundColor=[UIColor whiteColor];
//给bar设置半透明
nav.navigationBar.translucent=YES;
//给bar设置颜色
nav.navigationBar.backgroundColor=[UIColor brownColor];
//给bar设置纹理颜色
nav.navigationBar.tintColor=[UIColor redColor];
//给bar设置背景图片
[nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"12"] forBarMetrics:UIBarMetricsDefault];