我在用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?发布于 2017-08-03 21:45:39
在调用时,确保将animated Bool设置为true
present(viewController, animated: true, completion: nil)和
dismiss(animated: true, completion: nil)https://stackoverflow.com/questions/45495017
复制相似问题