Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Support Dismiss without Animation #12

Open
jrendel opened this issue Nov 15, 2019 · 3 comments
Open

Support Dismiss without Animation #12

jrendel opened this issue Nov 15, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jrendel
Copy link

jrendel commented Nov 15, 2019

If I call dismiss(animated: false) the animation does not complete properly and the underlying view is left in the state it is in when behind the modal.

Is this meant to work?

@radianttap
Copy link
Owner

Not sure, will need to check this out.

@radianttap
Copy link
Owner

If the animated: false is sent, both on presenting and dismissing, these respective methods are not called:

func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning?

func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning?

I'm not sure what is UIKit internally doing in this case or what's the appropriate way to render the final display.

@radianttap radianttap added enhancement New feature or request help wanted Extra attention is needed labels Nov 21, 2019
@radianttap
Copy link
Owner

In order to perform required visual changes, I need access to UIViewControllerContextTransitioning which is not available anywhere I can see except inside the animateTransition(using transitionContext: UIViewControllerContextTransitioning) which is not called because previously mentioned animationController(...) APIs are not called.

Any way to build that context manually..?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants