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

Only disable user interaction when animating (fixes Issue #242) #243

Merged
merged 1 commit into from
Oct 21, 2016
Merged

Only disable user interaction when animating (fixes Issue #242) #243

merged 1 commit into from
Oct 21, 2016

Conversation

virtualrapha
Copy link
Contributor

What is this PR for?

This PR fixes #242.

What was the source of the problem?

When moveToViewController(at: Int, animated: Bool) or moveTo(viewController: UIViewController, animated: Bool) was called, user interaction was disabled to prevent the user from interacting with the UI in the middle of a transition. Then, in scrollViewDidEndScrollingAnimation(_:UIScrollView), user interaction would be enabled again. However, when passing false for theanimated parameter, this method does not get called and user interaction won't be enabled again.

What's the fix for the problem?

The fix is simple. We don't need to disable user interaction when the transition is not animated since the contentOffset of the scroll view gets set immediately. I tested it and can I can confirm that it works now.

How to test these changes

In the corresponding issue, you will find a link to an example project which demonstrates the issue. Run it and tap the bar button item to confirm the issue. Then open the Cartfile and specify this branch:

github "raphaklr/XLPagerTabStrip" "fix/user_interaction_disabled_when_not_animating"

Run

carthage update --platform ios

, build the project and see the issue fixed.

@mtnbarreto @mats-claassen please review and merge 🙂

@trispo
Copy link

trispo commented Oct 21, 2016

Would be nice if this PR could be merged soon. We have issues regarding this issue since updating to v. 6.0.0.

@mats-claassen mats-claassen merged commit d18a243 into xmartlabs:master Oct 21, 2016
@mats-claassen
Copy link
Member

Thanks for the PR

@trispo
Copy link

trispo commented Oct 21, 2016

perfect. thanks

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

Successfully merging this pull request may close these issues.

User interaction is disabled when moving to another view without animation
3 participants