https://github.com/kyleyang/kynavigationfademanager
KYNavigationFadeManager , easy to fade UINavigationController bar and support change bar item color
https://github.com/kyleyang/kynavigationfademanager
fade hidden kynavigationfademanager uinavigationcontroller
Last synced: 4 months ago
JSON representation
KYNavigationFadeManager , easy to fade UINavigationController bar and support change bar item color
- Host: GitHub
- URL: https://github.com/kyleyang/kynavigationfademanager
- Owner: kyleYang
- License: mit
- Created: 2017-06-16T08:40:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-13T16:32:02.000Z (over 6 years ago)
- Last Synced: 2025-10-23T09:59:21.990Z (4 months ago)
- Topics: fade, hidden, kynavigationfademanager, uinavigationcontroller
- Language: Swift
- Homepage:
- Size: 18.2 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KYNavigationFadeManager
[](https://travis-ci.org/kyleYang/KYNavigationFadeManager)
[](http://cocoapods.org/pods/KYNavigationFadeManager)
[](http://cocoapods.org/pods/KYNavigationFadeManager)
[](http://cocoapods.org/pods/KYNavigationFadeManager)
## introduction
This fade manager is a easy way to manage the uinavigationbar
Support to change UIBarButtonItem and title color when scroll , the navigation can be clear color (change the alpha from 0 - 1)
The UIBarButtonItem only support UIBarButtonItem.image and UIBarButtonItem's customView is UIButton (image and backgroundimage) 。
The fullColor shoulde be set. Not detech the image color because it's maybe wrong
## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Easy to use it
### init
```swift
self.fadeManager = KYNavigationFadeManager(viewController: self, scollView: self.tableView, zeroColor: UIColor.white, fullColor: UIColor.red)
self.fadeManager.allowTitleHidden = shouldeHiddenTitle
self.fadeManager.zeroAlphaOffset = 0
self.fadeManager.fullAlphaOffset = 200
```
### prepare and run
```swift
open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.fadeManager.viewWillAppear(animated)
self.fixNavigationBarCorruption()
}
open override func viewWillDisappear(_ animated: Bool) {
self.fadeManager.viewWillDisappear(animated)
super .viewWillDisappear(animated)
}
```
## Requirements
## Installation
KYNavigationFadeManager is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "KYNavigationFadeManager"
```
## Author
kyleYang, yangzychina@gmail.com
## License
KYNavigationFadeManager is available under the MIT license. See the LICENSE file for more info.