# WRNavigationBar **Repository Path**: yxwApp/WRNavigationBar ## Basic Information - **Project Name**: WRNavigationBar - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-07-15 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 
[For Swift:https://github.com/wangrui460/WRNavigationBar_swift](https://github.com/wangrui460/WRNavigationBar_swift) ------------------------------------------------------------ ## Requirements - iOS 8+ - Xcode 8+ ## Demo          ## Installation > **CocoaPods** > pod 'WRNavigationBar' > **手动拖入** > 将 WRNavigationBar 文件夹拽入项目中,导入头文件:#import "WRNavigationBar.h" ## Use
// 一行代码搞定导航栏显示图片
[self wr_setNavBarBackgroundImage:[UIImage imageNamed:@"millcolorGrad"]];
// 一行代码搞定导航栏颜色
[self wr_setNavBarBarTintColor:[UIColor whiteColor]];
// 一行代码搞定导航栏透明度
[self wr_setNavBarBackgroundAlpha:alpha];
// 一行代码搞定导航栏两边按钮颜色
[self wr_setNavBarTintColor:[UIColor whiteColor]];
// 一行代码搞定导航栏上标题颜色
[self wr_setNavBarTitleColor:[UIColor whiteColor]];
// 一行代码搞定状态栏是 default 还是 lightContent
[self wr_setStatusBarStyle:UIStatusBarStyleLightContent];
// 一行代码搞定导航栏底部分割线是否隐藏
[self wr_setNavBarShadowImageHidden:YES];
// 设置导航栏默认的背景颜色
[UIColor wr_setDefaultNavBarBarTintColor:MainNavBarColor];
// 设置导航栏所有按钮的默认颜色
[UIColor wr_setDefaultNavBarTintColor:[UIColor whiteColor]];
// 设置导航栏标题默认颜色
[UIColor wr_setDefaultNavBarTitleColor:[UIColor whiteColor]];
// 统一设置状态栏样式
[UIColor wr_setDefaultStatusBarStyle:UIStatusBarStyleLightContent];
// 如果需要设置导航栏底部分割线隐藏,可以在这里统一设置
[UIColor wr_setDefaultNavBarShadowImageHidden:YES];
## More
我的简书: [韦德460](http://www.jianshu.com/p/7e92451ab0b2)
## Update
- **2017.07.09**
解决问题:当一个控制器中包含多个控制器时,导航栏颜色或透明度不正常的问题
- **2017.07.05**
添加新功能:全局设置导航栏显示图片(不建议在非自定义导航栏中使用)
- **2017.07.02**
添加新功能:导航栏可显示图片
- **2017.06.29**
添加新功能:可单独设置每个控制器对应导航栏底部分割线是否隐藏
- **2017.06.29**
解决问题:解决引入WRNavigationBar后,无法设置导航栏标题大小的问题
- **2017.06.19**
解决问题:解决移动导航栏后右滑返回中途取消导致的导航栏错位的问题
- **2017.06.15**
解决问题:解决scrollView正在滑动的时候,点击返回按钮,导航栏颜色变化突兀的问题
- **2017.06.04**
新增Demo:大半夜的开了一个新的分支extern,为了翻译一下swift版本,因为当前swift版本功能已经很全面了,只是一直没时间写oc,最近又有新的需求!
- **2017.05.16**
新增Demo:完成自定义导航栏实现透明渐变等效果
- **2017.05.12**
解决问题:侧滑一点松开透明的导航栏会变不透明
## Features
# Contact me
- Weibo: [@wangrui460](http://weibo.com/wangrui460)
- Email: wangruidev@gmail.com
- QQ:1204607318
# License
WRNavigationBar is available under the MIT license. See the LICENSE file for more info.