TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by crexista.
KabuKit is Simple & Tiny Application’s Transition Framework
KabuKitはアプリケーションの画面遷移時のルーティングと
その際に各画面で必要となっている値渡しを行うシンプルなフレームワークです。
このREADME.mdはまだ完全ではありません、以下はまだ書き途中です
//遷移元
extension FromViewController : Scene {
typealias contextType : Void
}
// 遷移先
extension ToViewController: Scene {
typealias contextType: String
}
class TrasitRequest: Request<String>()
extension FromViewController : Scene {
typealias contextType : String
@IBAction func onTapNext(sender: UIButton) {
send(TransitRequst("hello"))
}
}
class SampleGuide {
typealias Stage = UINavigationController
func start(with operation: SceneOperation<UINavigationController>) {
operation.at(Sample1ViewController.self) { s in
s.given(Sample2Request.self) { (args) in
args.stage.pushViewController(args.next, animated: true)
return {
args.stage.popViewController(animated: true)
}
}
}
}
}