星空网 > 软件开发 > 操作系统

【代码笔记】自定义导航条颜色

一,效果图。

【代码笔记】自定义导航条颜色images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151022133638755-1372507710.jpg" width="218" height="400" />

二,工程图。

【代码笔记】自定义导航条颜色

三,代码。

AppDelegate.m

【代码笔记】自定义导航条颜色
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(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:用竖着(拿手机)时UINavigationBar的标准的尺寸来显示UINavigationBar.  //UIBarMetricsLandscapePhone:用横着时UINavigationBar的标准尺寸来显示UINavigationBar  [nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"1.jpg"] forBarMetrics:UIBarMetricsDefault];    self.window.rootViewController=nav;        self.window.backgroundColor = [UIColor whiteColor];  [self.window makeKeyAndVisible];  return YES;}
【代码笔记】自定义导航条颜色

 




原标题:【代码笔记】自定义导航条颜色

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

 2021年亚马逊新卖家该怎么选品呢?:https://www.ikjzd.com/articles/135567
运营秘籍:Shopee广告成效追踪优化:https://www.ikjzd.com/articles/135571
最后一个月,圣诞、疫情和英国脱欧的三重夹!:https://www.ikjzd.com/articles/135572
OPPO案例分析|建设品牌海外的思想领导力:https://www.ikjzd.com/articles/135573
欧盟初步认定亚马逊破坏公平竞争,或处以巨额罚金:https://www.ikjzd.com/articles/135574
苏宁旗下公司:https://www.ikjzd.com/articles/135575
17万件月销量!Wildplus Beauty香薰身体精华油大热趋势 :https://www.kjdsnews.com/a/1836305.html
17万件月销量!Wildplus Beauty香薰身体精华油大热趋势 :https://www.goluckyvip.com/news/186214.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流