How can one push a new navigation controller from an existing navigation controller, as is done for Facebook's instant articles pictured below?
In this case, would you have to create a view controller schema with a master navigation controller with a translucent navigation bar that wraps both the Facebook tab bar / navigation controller and the instant article navigation controller?
Edit: Added Snapchat example
Are you thinking of the different UINavigationBar
rather than the UINavigationController
? I think you can already change the bar appearance for a different UIViewController
... if its being a problem then you can make a class for the UINavigationController
and add functionality in there to change appearance of the bar for what ever the UIViewController
is being viewed.
The delegate methods of the UINavigationController
give you methods like
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool)
Inside that you can put a check like
if viewController.isKind(of: SomeViewController.self) {
//make this specific change for it
} else if viewController.isKind(of: SomeOtherViewController.self) {
//make this specific change for this other viewController
} else {
//make this for all other
}