mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
+3
-8
@@ -341,19 +341,14 @@ static NSURLCredential* clientAuthenticationCredential;
|
|||||||
{
|
{
|
||||||
_scrollEnabled = scrollEnabled;
|
_scrollEnabled = scrollEnabled;
|
||||||
_webView.scrollView.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
|
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||||
{
|
{
|
||||||
// Don't allow scrolling the scrollView.
|
// Don't allow scrolling the scrollView.
|
||||||
scrollView.bounds = _webView.bounds;
|
if (!_scrollEnabled) {
|
||||||
|
scrollView.bounds = _webView.bounds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setShowsHorizontalScrollIndicator:(BOOL)showsHorizontalScrollIndicator
|
- (void)setShowsHorizontalScrollIndicator:(BOOL)showsHorizontalScrollIndicator
|
||||||
|
|||||||
Reference in New Issue
Block a user