diff --git a/apple/Handlers/RNNativeViewHandler.mm b/apple/Handlers/RNNativeViewHandler.mm index 2f12060b9e..667d600640 100644 --- a/apple/Handlers/RNNativeViewHandler.mm +++ b/apple/Handlers/RNNativeViewHandler.mm @@ -100,7 +100,7 @@ - (void)reset - (void)updateStateIfScrollView { - UIScrollView *scrollView = [_gestureHandler retrieveScrollView:self.view]; + RNGHUIScrollView *scrollView = [_gestureHandler retrieveScrollView:self.view]; if (!scrollView) { return; } diff --git a/apple/RNGHUIKit.h b/apple/RNGHUIKit.h index 2f9e2e9b03..dc0b742ca2 100644 --- a/apple/RNGHUIKit.h +++ b/apple/RNGHUIKit.h @@ -4,6 +4,7 @@ typedef UIView RNGHUIView; typedef UITouch RNGHUITouch; +typedef UIScrollView RNGHUIScrollView; #define RNGHGestureRecognizerStateFailed UIGestureRecognizerStateFailed; #define RNGHGestureRecognizerStatePossible UIGestureRecognizerStatePossible; @@ -17,6 +18,7 @@ typedef UITouch RNGHUITouch; typedef RCTUIView RNGHUIView; typedef RCTUITouch RNGHUITouch; +typedef NSScrollView RNGHUIScrollView; #define RNGHGestureRecognizerStateFailed NSGestureRecognizerStateFailed; #define RNGHGestureRecognizerStatePossible NSGestureRecognizerStatePossible; diff --git a/apple/RNGestureHandler.h b/apple/RNGestureHandler.h index 5d2d7f592b..15857abe0f 100644 --- a/apple/RNGestureHandler.h +++ b/apple/RNGestureHandler.h @@ -9,12 +9,6 @@ #import #import -#if TARGET_OS_OSX -#define RNGHUIScrollView NSScrollView -#else -#define RNGHUIScrollView UIScrollView -#endif - #define VEC_LEN_SQ(pt) (pt.x * pt.x + pt.y * pt.y) #define TEST_MIN_IF_NOT_NAN(value, limit) \ (!isnan(limit) && ((limit < 0 && value <= limit) || (limit >= 0 && value >= limit)))