Giter VIP home page Giter VIP logo

rrnavigationbar's Introduction

License CocoaPods Compatible Weibo Twitter

RRNavigationBar

bring UINavigationBar to UIViewController.

Introduction

KMNavigationBarTransition provide a grace method deal with navigationBar transition, and requires zero line of code changes, which is awesome.

Here is the situation I couldn't doing well by using KMNavigationBarTransition: first page is a product list, click product line, push to product details page, requires transparent navigationBar, while you scrolling, it could recover to default navigationBar's appearance. Continue push to the next page, the navigationBar needs to look like the first page, which is the default appearance. (like the following 1st gif tells.)

In a word, what I wanted is change the navigationBar's appearance only affect current viewController, which is this repo trying to do.

Requirements

  • iOS 7.0+

My working environment is iOS 10.2 + Xcode 8.2.1, the minimum support version is iOS7 in theory, but without test passed.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate Redes into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
use_frameworks!

pod 'RRNavigationBar'

Then, run the following command:

$ pod install

You should open the {Project}.xcworkspace instead of the {Project}.xcodeproj after you installed anything from CocoaPods.

Usage

In ViewController's viewDidLoad method:

self.rr_navigationBar.xxx = newValue;

If the viewController's view is activated, will take effect immediately, otherwise when viewWillLayoutSubviews called.

For more information see the demo in project.

Supported Methods

  • barStyle
  • translucent
  • tintColor
  • barTintColor
  • backgroundColor
  • shadowImage
  • setBackgroundImage:forBarMetrics:
  • alpha
  • rr_forceShadowImageHidden

Try not change translucent property, which is may cause navigationBar flash when animation complete with extends container ViewController's view backgroundColor.

Set hiddenproperty will have no effect, try use setBackgroundImage:forBarMetrics: & shadowImage make navigationBar invisible.

License

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

Refrence

rrnavigationbar's People

Contributors

cuzv avatar

Watchers

Carabineiro 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.