marcosgriselli / SwipeableTabBarController

UITabBarController with swipe interaction between its tabs.
MIT License
1.54k stars 107 forks source link

Prevent other gesture recognizers from overriding the tap animation #91

Closed wasp898 closed 4 years ago

wasp898 commented 4 years ago

Fixes #90

Checklist

Description

This pull requests fixes an issue caused by having other gesture recognizers in the app that can cause the pan gesture of the tab bar to fail and never get in .ended state. This would lead to the tap animation to be overridden by the swipe animation by mistake. It is especially a problem for those like me who want the tap animation to be disabled.

The PR also updates the example app to show that it's possible to disable the tap animation by setting its duration to 0.

marcosgriselli commented 4 years ago

Thanks for the PR @wasp898 I'll take a look at it later today and also check the possibility of setting the transition animation to nil to disable the animation.

coditobot commented 4 years ago
1 Error
:no_entry_sign: XIBs must not have misplaced views
1 Warning
:warning: This PR does not have any assignees yet.
1 Message
:book: Thanks @wasp898! :tada:

Current coverage for Pods_SwipeableTabBarController_Example.framework is 0.00%

No files affecting coverage found


Current coverage for SwipeableTabBarController.framework is 82.21%

Files changed - -
SwipeableTabBarController.swift 77.44% :warning:

Current coverage for SwipeableTabBarController_Example.app is 54.76%

Files changed - -
TabBarController.swift 100.00% :white_check_mark:

Powered by xcov

Generated by :no_entry_sign: Danger

marcosgriselli commented 4 years ago

@wasp898 I created a new PR (#92) that restores public transitioning properties so they can be set to nil to disable animations. Would you like to take a look at it?

wasp898 commented 4 years ago

@wasp898 I created a new PR (#92) that restores public transitioning properties so they can be set to nil to disable animations. Would you like to take a look at it?

Ok thanks, I just did. I do agree that it's better to set the tap animation to nil. I see that you kept the bug fix I proposed and that's what matters to me, so I'm happy.

p.s. I still have some issues with view controllers going black from time to time though. Hope I can help figuring that out as well so that I can safely adopt this dependency in my app. Would be so cool to have! Thanks again.