StylableNavigationBar
StylableNavigationBar provide a lightweight replacement for a standard UINavigationController, so you can easily manage your navigation and status bar styles throughout your iOS app.
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
iOS 11, Swift 5
Installation
- StylableNavigationBar is available through CocoaPods. To install
it, simply add the following line to your Podfile:
- Replace class for your UINavigationController to StylableNavigationController. If you are using Storyboard, you can change it using the Inspector at the right side of the Xcode:
- If you creating navigation controller from code you can do it same way as when you create a normal UINavigationController:
- Define preffered bar style for child view controller by making its extension:
- Done.
Navigation Bar Styling
There are two ways to define navigation bar style
- Use predefined NavigationControllerStyle like
.darkTinted
.lightTinted
and specify a tint color:
- Create your own style (e.g.
AppMainNavigationBarStyle
) conforming toNavigationBarStyleProtocol
:
Roadmap
- [x] Handle iOS 11 NavigationController's largeTitle
- [ ] Add an ability to define image as a navigation bar's background
- [ ] Allow to define title styles (e.g. two lines title etc.)