Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于自定义转场动画的疑问 #298

Open
Nododo opened this issue May 26, 2021 · 0 comments
Open

关于自定义转场动画的疑问 #298

Nododo opened this issue May 26, 2021 · 0 comments

Comments

@Nododo
Copy link

Nododo commented May 26, 2021

rickytan,你好,我们项目中用到了这个库,目前在转场动画时遇见了问题:

我自定义一个类,遵守 UIViewControllerAnimatedTransitioning 协议 ,在当前UIViewController的

- (id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC;

返回自定义类的实例对象,但在这类中只走

- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext;

不走

- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext;

如果在UIViewController的

- (id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC;

直接返回self,上面的两个代理方法都走。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant