ZSNavigationBar
ZSNavigationBar uses category to allow you change UINavigationBar appearance dynamically.(supported iOS 11+ and iPhone X)
Installation
CocoaPods
- Swift:
- Add
pod 'ZSNavigationBar'
to your Podfile. - Run
pod install
orpod update
. - Import
ZSNavigationBar
.
- Objective-c:
- Add
pod 'ZSNavigationBar-oc'
to your Podfile. - Run
pod install
orpod update
. - Import
ZSNavigationBar
.
Manually
- Add all files under
Source-oc
orSource-swift
folder. - Link with required frameworks:
UIKit
. - If you use oc version, just import
UINavigationBar+custom.h
.
Requirements
- iOS 8+
- Xcode 9+
- swift 3.0+
- Objective-c
Usage
- Swift:
The category includes several methods that helps to change UINavigationBar's appearance dynamically:
And usually in viewWillDisappear
, you should call this method to avoid any side effects:
- Objective-c:
First, import this lib:
The category includes several methods that helps to change UINavigationBar's appearance dynamically
And usually in viewWillDisappear
, you should call this method to avoid any side effects: