Navigation Kit used for make threat with screen that have differents navigation bar style, make change style of bar easy.
- set Background Image for navigation bar and title color for every single screen.
- set color for navigation bar and their title for every single screen.
- Hide navigation bar feature for every single screen.
- can make navigation bar color transparent for every single screen.
- can set default navigation bar style if Viewcontroller not implement NavigationDelegate will take this default style.
- IOS 13+
- Swift 5+
pod 'NavigationKit',:git => "https://github.com/salah-mohammed/NavigationKit.git"
- First
public class MainNavigationController: NavigationController {
public override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
- Second
if you want set Navigation bar transparent and change title color .
class FirstViewController: UIViewController,NavigationDelegate {
var style=Navigation.Style.init(Navigation.Style.custom(.all(AppStyle.transparentBarStyle),UIColor.black))
public override func viewDidLoad() {
super.viewDidLoad()
}
}
if you want to set Navigation bar color and set title color for it.
class SecondViewController: UIViewController,NavigationDelegate {
var style=Navigation.Style.init(Navigation.Style.custom(.all(AppStyle.greenBarStyle),UIColor.white))
public override func viewDidLoad() {
super.viewDidLoad()
}
}
if you want to hide Navigation bar.
class ThiredViewController: UIViewController,NavigationDelegate {
var style=Navigation.Style.init(Navigation.Style.hide);
public override func viewDidLoad() {
super.viewDidLoad()
}
}
if you want to set background image for Navigation bar and set title color for it.
class ForthViewController: UIViewController,NavigationDelegate {
var style=Navigation.Style.init(Navigation.Style.custom(.all(AppStyle.backgroundImageBarStyle),UIColor.white))
public override func viewDidLoad() {
super.viewDidLoad()
}
}
- Thired
if you want to set default style 'if Viewcontroller not implement NavigationInfoDelegate'
Navigation.shared.defaultStyle = Navigation.Style.custom(.all(AppStyle.yelloBarStyle),UIColor.white)
self.navigationController?.refrehStyle();
NavigationKit is released under the MIT license. See LICENSE for details.
- salahalimohamed1995@gmail.com
- https://www.facebook.com/salah.shaker.7
- +972597105861 (whatsApp And PhoneNumber)
- https://www.linkedin.com/in/salah-mohamed-676b6a17a (Linkedin)