1

我正在使用UIModalPresentationStyle.custom.

在我UIViewControllerTransitioningDelegate为什么会调用此方法:

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

但是这些函数都没有被调用:

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

1 回答 1

0

确保在调用时将animatedBool设置为true

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

dismiss(animated: true, completion: nil)
于 2017-08-03T21:45:39.800 回答