Support Dismiss without Animation
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?
Not sure, will need to check this out.
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.
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..?