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

Push transition also does fade in/fade out of ViewControllers #136

Closed
pavelkorolevxyz opened this issue Jan 25, 2018 · 6 comments
Closed

Comments

@pavelkorolevxyz
Copy link

When scrolling interaction is enabled on PageboyViewController and user swipes between pages there is no fade in/fade out effect on controller which comes from left/to right. But it's here on scrollToPage. Looks like it's default behavior of CATransition with push type.
On previous Pageboy versions there were no custom animations, so this behavior couldn't be reproduced. Is there any way to get same now?

@msaps
Copy link
Member

msaps commented Jan 26, 2018

@PavelKorolev hmmm just had a look at the scroll animation when using setViewControllers with animated set to true and also with using the custom Pageboy transition engine and I can't seem to see any difference?

Would you be able to provide a video or something showing what you're seeing?

@msaps msaps added the support label Jan 26, 2018
@pavelkorolevxyz
Copy link
Author

pavelkorolevxyz commented Jan 26, 2018

Here is Gif
You can see when I'm scrolling manually there is no white background blinking over colorful viewcontrollers. But when I'm scrolling using button click and scrollToPage then it's here.

@pavelkorolevxyz
Copy link
Author

Any updates on this? Don't want to go back with Pageboy version 1 but currently don't see any solution to workaround Apple's fade animation on push.

@msaps
Copy link
Member

msaps commented Feb 23, 2018

@PavelKorolev hey sorry for taking so long!

I've just released Pageboy 2.4 which should resolve the issue!

You can now set PageboyViewController.transition to nil (it is this by default) which will revert to using the default UIPageViewController animation rather than the custom CATransition. You can obviously set a custom transition in the same way as before 👍

@msaps msaps added improvement and removed support labels Feb 23, 2018
@msaps msaps closed this as completed Feb 26, 2018
@pavelkorolevxyz
Copy link
Author

@msaps Big thanks for that, works fine. As future improvement I can suggest to move this default behavior to Transition.Style enum instead of nil so we can set its duration same as for any other transtion style.

@msaps
Copy link
Member

msaps commented Feb 27, 2018

@PavelKorolev this unfortunately isn’t possible as the default animation isn’t configurable at all. Simply a yes or a no, thus why I opted for the nil approach

Sent with GitHawk

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

No branches or pull requests

2 participants