Giter Club home page Giter Club logo

navigationgradient's Introduction

页面切换导航栏渐变,类似QQ导航栏效果。

页面透明和不透明之间的切换 不同颜色之间的切换

NavigationGradient

注1 通过集成基类来实现效果
注2 自定义UINavigationController类的原因有两种

  1. 首先自定义左上角返回按钮会造成右滑手势失效,可在基类nav里给所有页面添加右滑手势代理,让程序可以继续使用右滑返回。
  2. 实现了第一步之后会出现一级页面也响应右滑返回手势的BUG,会出现推出下一页面,当前页面卡死的bug,再右滑会出现明显的错误切换,在基类nav里重写手势返回的- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer方法,可以来控制右滑手势是否响应。
  3. 如果想要状态栏可以改变白色或者黑色两种样式可以建一个navigationcontroller的category,在.m里实现下面两个方法。
- (UIViewController *)childViewControllerForStatusBarStyle{
    return self.visibleViewController;
}
- (UIViewController *)childViewControllerForStatusBarHidden{
    return self.visibleViewController;
}

navigationgradient's People

Contributors

uclort avatar

Watchers

 avatar

Forkers

xzhhbx

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.