|
@@ -52,6 +52,7 @@ static NSDictionary* customCertificatesForHost;
|
52
|
52
|
@implementation RNCWKWebView
|
53
|
53
|
- (void)scrollWheel:(NSEvent *)theEvent {
|
54
|
54
|
RNCWebView *rncWebView = (RNCWebView *)[self superview];
|
|
55
|
+ RCTAssert([rncWebView isKindOfClass:[rncWebView class]], @"superview must be an RNCWebView");
|
55
|
56
|
if (![rncWebView scrollEnabled]) {
|
56
|
57
|
[[self nextResponder] scrollWheel:theEvent];
|
57
|
58
|
return;
|
|
@@ -713,15 +714,12 @@ static NSDictionary* customCertificatesForHost;
|
713
|
714
|
#endif // !TARGET_OS_OSX
|
714
|
715
|
|
715
|
716
|
#if !TARGET_OS_OSX
|
|
717
|
+// UIScrollViewDelegate method
|
716
|
718
|
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
717
|
|
-#else
|
718
|
|
-- (void)scrollViewWillBeginDragging:(RCTUIScrollView *)scrollView
|
719
|
|
-#endif // !TARGET_OS_OSX
|
720
|
719
|
{
|
721
|
|
-#if !TARGET_OS_OSX
|
722
|
720
|
scrollView.decelerationRate = _decelerationRate;
|
723
|
|
-#endif // !TARGET_OS_OSX
|
724
|
721
|
}
|
|
722
|
+#endif // !TARGET_OS_OSX
|
725
|
723
|
|
726
|
724
|
- (void)setScrollEnabled:(BOOL)scrollEnabled
|
727
|
725
|
{
|
|
@@ -732,10 +730,8 @@ static NSDictionary* customCertificatesForHost;
|
732
|
730
|
}
|
733
|
731
|
|
734
|
732
|
#if !TARGET_OS_OSX
|
|
733
|
+// UIScrollViewDelegate method
|
735
|
734
|
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
736
|
|
-#else
|
737
|
|
-- (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView
|
738
|
|
-#endif // !TARGET_OS_OSX
|
739
|
735
|
{
|
740
|
736
|
// Don't allow scrolling the scrollView.
|
741
|
737
|
if (!_scrollEnabled) {
|
|
@@ -766,6 +762,7 @@ static NSDictionary* customCertificatesForHost;
|
766
|
762
|
_onScroll(event);
|
767
|
763
|
}
|
768
|
764
|
}
|
|
765
|
+#endif // !TARGET_OS_OSX
|
769
|
766
|
|
770
|
767
|
- (void)setDirectionalLockEnabled:(BOOL)directionalLockEnabled
|
771
|
768
|
{
|