|
@@ -341,6 +341,19 @@ static NSURLCredential* clientAuthenticationCredential;
|
341
|
341
|
{
|
342
|
342
|
_scrollEnabled = scrollEnabled;
|
343
|
343
|
_webView.scrollView.scrollEnabled = scrollEnabled;
|
|
344
|
+
|
|
345
|
+ // Override the scrollView delegate to prevent scrolling.
|
|
346
|
+ if (!scrollEnabled) {
|
|
347
|
+ _webView.scrollView.delegate = self;
|
|
348
|
+ } else {
|
|
349
|
+ _webView.scrollView.delegate = _webView;
|
|
350
|
+ }
|
|
351
|
+}
|
|
352
|
+
|
|
353
|
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
|
354
|
+{
|
|
355
|
+ // Don't allow scrolling the scrollView.
|
|
356
|
+ scrollView.bounds = _webView.bounds;
|
344
|
357
|
}
|
345
|
358
|
|
346
|
359
|
- (void)setShowsHorizontalScrollIndicator:(BOOL)showsHorizontalScrollIndicator
|