• Stars
    star
    632
  • Rank 68,743 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WRNavigationBar which allows you to change NavigationBar's appearance dynamically

image

For Objective-C:https://github.com/wangrui460/WRNavigationBar


iOS 技术交流

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

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

Requirements

  • iOS 8+
  • Xcode 8+

Demo

导航栏显示渐变色

导航栏显示图片

新浪微博个人中心

qq空间

知乎日报

QQ我的资料页

蚂蚁森林

连续多个界面导航栏透明

自定义导航栏

移动导航栏

Installation

手动拖入 将 WRNavigationBar 文件夹拽入项目中即可使用

How To Use

具体使用方法请参考Demo


// 一行代码搞定导航栏颜色
navBarBarTintColor = .white
// 一行代码搞定导航栏透明度
navBarBackgroundAlpha = alpha
// 一行代码搞定导航栏两边按钮颜色
navBarTintColor = UIColor(red: 0, green: 0.478431, blue: 1, alpha: 1.0)
// 一行代码搞定导航栏上标题颜色
navBarTitleColor = .black
// 一行代码搞定状态栏是 default 还是 lightContent
statusBarStyle = .default
// 一行代码搞定导航栏底部分割线是否隐藏
navBarShadowImageHidden = true;

// 设置导航栏默认的背景颜色
UIColor.defaultNavBarBarTintColor = UIColor.init(red: 0/255.0, green: 175/255.0, blue: 240/255.0, alpha: 1)
// 设置导航栏所有按钮的默认颜色
UIColor.defaultNavBarTintColor = .white
// 设置导航栏标题默认颜色
UIColor.defaultNavBarTitleColor = .white
// 统一设置状态栏样式
UIColor.defaultStatusBarStyle = .lightContent
// 如果需要设置导航栏底部分割线隐藏,可以在这里统一设置
UIColor.defaultShadowImageHidden = true

See detail

我的简书: 韦德460

Update

  • 2017.12.09 解决问题:解决导航栏颜色和标题颜色改变失败的bug

  • 2017.12.09 解决问题:解决点击返回按钮导航栏标题颜色闪烁的问题

  • 2017.11.29- 更新:解决部分用户设置导航栏无效的问题~

  • 2017.11.29- 更新:支持自定义导航栏~

  • 2017.11.25 更新:更新到 Swift 4,适配iOS 11、iPhone X,自定义导航栏再等两天~

  • 2017.07.22 添加新DEMO:连续多个界面导航栏透明

  • 2017.07.09 解决问题:当一个控制器中包含多个控制器时,导航栏颜色或透明度不正常的问题

  • 2017.07.04 添加新功能:全局设置导航栏显示图片(不建议在非自定义导航栏中使用)

  • 2017.07.01 添加新功能:导航栏可显示图片

  • 2017.06.29 添加新功能:可单独设置每个控制器对应导航栏底部分割线是否隐藏

  • 2017.06.29 解决问题:解决引入WRNavigationBar后,无法设置导航栏标题大小的问题

  • 2017.06.19 解决问题:解决移动导航栏后右滑返回中途取消导致的导航栏错位的问题

  • 2017.06.15 解决问题:解决scrollView正在滑动的时候,点击返回按钮,导航栏颜色变化突兀的问题

  • 2017.05.21 解决问题:解决push导航栏没有渐变动画太突兀的问题

  • 2017.05.20 解决问题:解决侧滑返回导航栏没有渐变动画太突兀的**问题

  • 2017.05.16 新增Demo:完成自定义导航栏实现透明渐变等效果

  • 2017.05.12 解决问题:侧滑一点松开透明的导航栏会变不透明

License

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

More Repositories

1

WRNavigationBar

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

WRCycleScrollView

Swift 自动无限轮播用这个就够了 swift 4
Swift
162
star
3

FloatView

浮动图片,类似京东或者美团外卖的偷红包,其实最相似的是苹果的AssistiveTouch(小圆点),使用更加简单!更加轻量!
Objective-C
73
star
4

WRCellView

自定义View,类似tableView的系统cell,使用方便 Custom View, similar to the tableView system cell, easy to use
Objective-C
64
star
5

SwiftUI-WRNavigationBar

custom navigationBar in swiftui
Swift
35
star
6

WRNetwork

WRNetwork 是基于 AFNetworking 封装的一套网络请求框架
Objective-C
26
star
7

BackBtnEventIntercept_swift

系统返回按钮事件拦截 System return button event interception
Swift
14
star
8

ZhihuDaily-Swift3.0

知乎日报Swift3.0 为了让我的另一个库WRNetWrapper使用起来更高效,特开此项目作为测试,代码从0开始
Swift
10
star
9

FloatView_swift

Swift版本 浮动图片,类似京东或者美团外卖的头红包,其实最相似的是苹果的AssistiveTouch(小圆点),使用更加简单!更加轻量!
Swift
8
star
10

WebViewBackStack

iOS webView 回退栈 webView内部跳转和原生跳转两不误
Objective-C
7
star
11

BackBtnEventIntercept

系统返回按钮事件拦截
Objective-C
7
star
12

WRAlphaChannelsHelper

remove of alpha channels
Objective-C
3
star
13

WRCellView_swift

自定义Cell
3
star
14

HiddenListLine4SwiftUI

hidden list sepatator 4 swiftui before iOS15
Swift
3
star
15

ImageE

Android 图片剪裁、编辑、滤镜等
Java
2
star
16

WRImageHelper

tint image with color | alpha | rect || insets
1
star
17

MsgForward

if you know how to forward by add parameter,please tell me !!!
Objective-C
1
star
18

WRNavigationItem

设置导航栏中间标题、左右按钮的一个分类
1
star
19

TemporaryStorage

临时存储
Objective-C
1
star