mirror of
https://github.com/expo/react-native-webview.git
synced 2026-11-15 09:18:06 -10:00
1 parent
211ae18971
commit
2cef5cbb3f
1 file changed
+3
-8
+3
-8
@@ -341,19 +341,14 @@ static NSURLCredential* clientAuthenticationCredential;
|
||||
{
|
||||
_scrollEnabled = scrollEnabled;
|
||||
_webView.scrollView.scrollEnabled = scrollEnabled;
|
||||
|
||||
// Override the scrollView delegate to prevent scrolling.
|
||||
if (!scrollEnabled) {
|
||||
_webView.scrollView.delegate = self;
|
||||
} else {
|
||||
_webView.scrollView.delegate = _webView;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
{
|
||||
// Don't allow scrolling the scrollView.
|
||||
scrollView.bounds = _webView.bounds;
|
||||
if (!_scrollEnabled) {
|
||||
scrollView.bounds = _webView.bounds;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setShowsHorizontalScrollIndicator:(BOOL)showsHorizontalScrollIndicator
|
||||
|
||||
Reference in new issue
Block a user