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?
1

There are 1 best solutions below

1
On BEST ANSWER

Make sure you set the animated Bool to true when calling

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

and

dismiss(animated: true, completion: nil)