New to this
cilman opened this issue · 3 comments
cilman commented
Hi, Im new to XCoordinator, im using it with viper and loved
I dont know where to ask questions so im writing here
- How can i prevent default transition animation, for ex : return .pop() is animating but i dont want it.
- How can i change default right to left transition animation to bottom to up, like we did it using standart VC push.
Thanks.
pauljohanneskraft commented
Hey - glad you like it 😊
- You can disable the transition when triggering a route, i.e. call
router.trigger(.someRoute, with: TransitionOptions(animated: false))
instead of justrouter.trigger(.someRoute)
- You can specify an
Animation
object with most of the available transitions (e.g.Transition.push
). Have a look at this folder for some examples and take a look at the code documentation - if you have any questions, feel free to comment here or open another issue.
cilman commented
Thanks for the answers, but i have some more issues
- I still can't use your advise on
router.pop()
. it doesn't have "with" option. - Im using
router.trigger(.initial, on: aCoordinator)
and it has no with too.
I think i can use Transitions with number 2 above , i expect it to solve numaber 1 ( .pop() ) too , am i right? I mean if I can an "do nothing" animation as dismissal animation, is that works?
pzmudzinski commented
@cilman I think API for passing options in trigger(... on: ...)
is missing. You can add it by yourself:
extension Transition {
public static func trigger<R: Router>(_ route: R.RouteType, on router: R, options: TransitionOptions) -> Transition {
Transition(presentables: [], animationInUse: nil) { _, _, completion in
router.trigger(route, with: options, completion: completion)
}
}
}