GithubHelp home page GithubHelp logo

cddapple / wrnavigationbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangrui460/wrnavigationbar

0.0 1.0 0.0 55.32 MB

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

Home Page: http://www.jianshu.com/p/540a7e6f7b40

License: MIT License

Ruby 1.72% Objective-C 98.28%

wrnavigationbar's Introduction

image

For Swift:https://github.com/wangrui460/WRNavigationBar_swift


Requirements

  • iOS 8+
  • Xcode 8+

Demo

导航栏显示渐变色

导航栏显示图片

新浪微博个人中心

qq空间

知乎日报

QQ我的资料页

蚂蚁森林

自定义导航栏

移动导航栏

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

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

License

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

wrnavigationbar's People

Contributors

wangrui460 avatar hefeiking avatar

Watchers

caodongdong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.