-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💥 fix does not work transition [#59]
- Loading branch information
Showing
37 changed files
with
342 additions
and
1,442 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// Copyright © 2017年 DWANGO Co., Ltd. | ||
// | ||
|
||
import Foundation | ||
import KabuKit | ||
|
||
class SampleALink : Link<Bool> {} | ||
class SampleBLink : Link<Void> {} | ||
|
||
class SampleSequenceRule : SequenceRule { | ||
typealias StageType = UINavigationController | ||
|
||
let scenario = Scenario<UINavigationController>() | ||
.at(Sample1AViewController.self) { (term) in | ||
term.when(SampleALink.self, to: { Sample1AViewController() }) { (from, stage, next) in | ||
stage.pushViewController(next, animated: true) | ||
} | ||
|
||
term.when(SampleBLink.self, to: { Sample1BViewController() }) { (from, stage, next) in | ||
stage.pushViewController(next, animated: true) | ||
} | ||
|
||
}.at(Sample1BViewController.self) { (term) in | ||
|
||
term.when(SampleALink.self, to: { Sample1AViewController() }) { (from, stage, next) in | ||
stage.pushViewController(next, animated: true) | ||
} | ||
|
||
term.when(SampleBLink.self, to: { Sample1BViewController() }) { (from, stage, next) in | ||
stage.pushViewController(next, animated: true) | ||
} | ||
} | ||
|
||
|
||
func onEnd<S>(page: S, stage: UINavigationController) where S : Page { | ||
stage.popViewController(animated: true) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Example/Sample1/Sequence/Scenes/Sample1B/Sample1BScene.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// Sample1BScene.swift | ||
// Example | ||
// | ||
// Created by crexista on 2016/11/24. | ||
// Copyright © crexista. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import KabuKit | ||
|
||
extension Sample1BViewController : Scene { | ||
|
||
typealias ContextType = Void | ||
|
||
func onPressAButton(sender: UIButton) { | ||
jumpTo(SampleALink(true)) | ||
} | ||
|
||
func onPressBButton(sender: UIButton) { | ||
jumpTo(SampleBLink()) | ||
} | ||
|
||
func onPressPrevButton(sender: UIButton) { | ||
prev() | ||
} | ||
|
||
// MARK: - Override | ||
override func viewDidLoad() { | ||
nextButtonA.addTarget(self, action: #selector(onPressAButton(sender:)), for: .touchUpInside) | ||
nextButtonB.addTarget(self, action: #selector(onPressBButton(sender:)), for: .touchUpInside) | ||
prevButton.addTarget(self, action: #selector(onPressPrevButton(sender:)), for: .touchUpInside) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.