KYFlipNavigationController

The KYFlipNavigationController is an custom NavigationController the use UIViewController to manager the UIViewController(include UINavigationController,UITabbarController,UIViewController) like the UINavigationController .
Many app like EasyNet News and Toutiao use TabbarController UINavigationController when push

Overview

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Init

Set up flipNavigationController as root of a window,self.flipNavigationController will find the KYFlipNavigationController if it’s exist!

Push or Pop

Push and pop almost like the UINavigationController . The key way is to find the flipNavigationController. It’s easy that we use a UIViewController’s extension

//Push
let viewController = ThirdViewController(nibName: nil, bundle: nil)
viewController.title = "cell_(indexPath.row)"
// push a navigationcontroller
let navi = UINavigationController(rootViewController: viewController)
self.rdv_tabBarController.flipNavigationController?.pushViewController(navi, animated: true)//self is add to a tabbarcontroller
//we also an push a UIViewController,and if self is not add to a tabbarcontroller
self.flipNavigationController?.pushViewController(viewController, animated: true)
//Pop
self.flipNavigationController?.popViewController(true)
//also we can pop to a viewcontroller or to the rootviewcontroller