1

I'm using UIModalPresentationStyle.custom.

In my UIViewControllerTransitioningDelegate why does this method get called:

func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController?

But none of these functions get called:

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

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

func interactionControllerForPresentation(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?

func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?
Justin Vallely
  • 5,932
  • 3
  • 30
  • 44

1 Answers1

0

Make sure you set the animated Bool to true when calling

present(viewController, animated: true, completion: nil)

and

dismiss(animated: true, completion: nil)
Justin Vallely
  • 5,932
  • 3
  • 30
  • 44
  • 1
    I have the opposite problem—animationController() gets called, but not presentationController(). Mode is set to .custom. I'm completely stumped and losing my mind rapidly (well, since this is wasting hours of my time, I suppose it's not so rapid). – jbm Jun 17 '18 at 22:46