Skip to content
项目

wangrui460/WRNavigationBar has 2,950 GitHub stars and 594 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-14 04:35 UTC. Last push 2021-07-19.

这些数字如何统计

实测星标增长

24小时
0
7天
-1
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

关于

超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等 WRNavigationBar which allows you to change NavigationBar's appearance dynamically

开发工具

README.md

原文

image


iOS 技术交流

我创建了一个 微信 iOS 技术交流群,欢迎小伙伴们加入一起交流学习~

可以加我微信我拉你进去(备注iOS),我的微信号 wr1204607318

Requirements

  • iOS 7.0+
  • Xcode 8+

Demo

拉钩App首页 新浪微博个人中心 qq空间 知乎日报
QQ我的资料页 蚂蚁森林 连续多个界面导航栏透明 移动导航栏

Installation

CocoaPods pod 'WRNavigationBar','~>1.4.0’ 如果未发现 1.4.0 请更新一下pod

手动拖入 将 WRNavigationBar 文件夹拽入项目中,导入头文件:#import "WRNavigationBar.h"

Use

✨✨ 一定要看 Demo 中的 AppDelegate 文件 ✨✨


// 设置是 全局使用WRNavigationBar,还是局部使用WRNavigationBar,目前默认是全局使用 (局部使用待开发)
[WRNavigationBar wr_widely];
// WRNavigationBar 不会对 blackList 中的控制器有影响
[WRNavigationBar wr_setBlacklist:@[@"SpecialController",
				 @"TZPhotoPickerController",
				 @"TZGifPhotoPreviewController",
				 @"TZAlbumPickerController",
				 @"TZPhotoPreviewController",
				 @"TZVideoPlayerController"]];

// 一行代码搞定导航栏颜色
[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];

// 设置导航栏默认的背景颜色
[WRNavigationBar wr_setDefaultNavBarBarTintColor:MainNavBarColor];
// 设置导航栏所有按钮的默认颜色
[WRNavigationBar wr_setDefaultNavBarTintColor:[UIColor whiteColor]];
// 设置导航栏标题默认颜色
[WRNavigationBar wr_setDefaultNavBarTitleColor:[UIColor whiteColor]];
// 统一设置状态栏样式
[WRNavigationBar wr_setDefaultStatusBarStyle:UIStatusBarStyleLightContent];
// 如果需要设置导航栏底部分割线隐藏,可以在这里统一设置
[WRNavigationBar wr_setDefaultNavBarShadowImageHidden:YES];

License

WRNavigationBar is available under the MIT license. See the LICENSE file for more info.

探索相关项目