Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bannzai/Kaeru
Switch viewcontroller like ios task manager
https://github.com/bannzai/Kaeru
Last synced: 6 days ago
JSON representation
Switch viewcontroller like ios task manager
- Host: GitHub
- URL: https://github.com/bannzai/Kaeru
- Owner: bannzai
- License: mit
- Created: 2016-08-28T13:50:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T08:56:52.000Z (almost 8 years ago)
- Last Synced: 2024-12-01T04:39:46.846Z (11 days ago)
- Language: Swift
- Size: 63.3 MB
- Stars: 513
- Watchers: 14
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Kaeru - Switch viewcontroller like iOS task manager. (UI / Transition)
- awesome-ios-star - Kaeru - Switch viewcontroller like iOS task manager. (UI / Transition)
README
# Kaeru
**Kaeru** can switch ViewController in NavigationController like iOS task manager UI (after iOS 9).
## Movie
![](https://cloud.githubusercontent.com/assets/10897361/19626981/268ca80a-9978-11e6-9fa3-465d0851aa31.gif)
## Usage
You can use `HistoryNavigationController`, that sub class of `UINavigationController`. It can be used like `UINavigationController`.### e.g
#### On storyboard
##### If you install through CocoaPods.
![](./KaeruIntroductionResource/on_storyboard_when_cocoapods.png)##### If you install through download or git clone.
![](./KaeruIntroductionResource/on_storyboard.png)#### Swift code in AppDelegate
```
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.
```
@IBAction func showViewerButtonPressed(sender: AnyObject) {
navigationController?.presentHistory()
}
```And it's possible tap each ViewController snap shots.
After it, begin scale animation and called automatically `UINavigationContoller.popToViewController`.## Customize
When called `HistoryNavigationController.presentHistory()`,
it's possible to set a custom `backgroundView`.```
let view = UIView(frame: UIScreen.mainScreen().bounds)
view.backgroundColor = .redColor()
navigationController?.presentHistory(view)
```This sample code write and run, when `HistoryNavigationController` appear, background becomes red.
## TODO
- [x] Support cocoapods.
- [x] Support Carthage.
- [ ] Add delegate methods.
- [ ] Test.## License
**Kaeru** is available under the MIT license. See the **LICENSE** file for more info.