@@ -751,11 +751,8 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni
751
751
return (otherGestureRecognizer == _panRecognizer || otherGestureRecognizer == _tapRecognizer);
752
752
}
753
753
754
- #elif __CC_PLATFORM_ANDROID
755
-
756
754
- (void ) onEnterTransitionDidFinish
757
755
{
758
- #if __CC_PLATFORM_IOS
759
756
// Add recognizers to view
760
757
UIView* view = [CCDirector sharedDirector ].view ;
761
758
@@ -765,22 +762,11 @@ - (void) onEnterTransitionDidFinish
765
762
[recognizers insertObject: _tapRecognizer atIndex: 0 ];
766
763
767
764
view.gestureRecognizers = recognizers;
768
- #elif __CC_PLATFORM_ANDROID
769
- dispatch_async (dispatch_get_main_queue (), ^{
770
- if (_detector)
771
- {
772
- [[[CCDirector sharedDirector ] view ] addGestureDetector: _detector];
773
- }
774
- });
775
- #endif
776
765
[super onEnterTransitionDidFinish ];
777
766
}
778
767
779
-
780
-
781
768
- (void ) onExitTransitionDidStart
782
769
{
783
- #if __CC_PLATFORM_IOS
784
770
// Remove recognizers from view
785
771
UIView* view = [CCDirector sharedDirector ].view ;
786
772
@@ -789,20 +775,35 @@ - (void) onExitTransitionDidStart
789
775
[recognizers removeObject: _tapRecognizer];
790
776
791
777
view.gestureRecognizers = recognizers;
778
+
779
+ [super onExitTransitionDidStart ];
780
+ }
781
+
792
782
#elif __CC_PLATFORM_ANDROID
783
+
784
+ - (void ) onEnterTransitionDidFinish
785
+ {
786
+ dispatch_async (dispatch_get_main_queue (), ^{
787
+ if (_detector)
788
+ {
789
+ [[[CCDirector sharedDirector ] view ] addGestureDetector: _detector];
790
+ }
791
+ });
792
+ [super onEnterTransitionDidFinish ];
793
+ }
794
+
795
+ - (void ) onExitTransitionDidStart
796
+ {
793
797
dispatch_async (dispatch_get_main_queue (), ^{
794
798
if (_detector)
795
799
{
796
800
[[[CCDirector sharedDirector ] view ] removeGestureDetector: _detector];
797
801
}
798
802
});
799
- #endif
800
803
801
804
[super onExitTransitionDidStart ];
802
805
}
803
806
804
-
805
-
806
807
- (CCTouchPhase)handleGestureEvent : (AndroidMotionEvent *)start end : (AndroidMotionEvent *)end
807
808
{
808
809
CCTouchPhase phase = CCTouchPhaseStationary;
0 commit comments