项目介绍:
Kaeru
Kaeru可以在NavigationController中切换ViewController,使之有iOS的任务管理器UI(iOS 9之后)的效果。
可以直接继承于HistoryNavigationController,NavigationController的子类。
DEMO 直接下载:
e.g
On storyboard 【使用storyboard进行集成,需要更换的是ClassName】
If you install through CocoaPods.
If you install through download or git clone. 【自定义ClassName】
Swift code in AppDelegate
[Objective-C] 查看源文件 复制代码
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. let viewContoller = UIViewController() let navigationController = HistoryNavigationController(rootViewController: viewContoller) window?.rootViewController = navigationController window?.makeKeyAndVisible() return true }
And you can call self.navigationController?.presentHistory() in UIViewController sub class. After it, appearance would change like iOS task manager UI.
[Objective-C] 查看源文件 复制代码
@IBAction func showViewerButtonPressed(sender: AnyObject) { navigationController?.presentHistory() }