diff options
-rw-r--r-- | CyteKit/WebView.h | 1 | ||||
-rw-r--r-- | CyteKit/WebView.mm | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CyteKit/WebView.h b/CyteKit/WebView.h index ba2043b..c7eeb4b 100644 --- a/CyteKit/WebView.h +++ b/CyteKit/WebView.h @@ -83,6 +83,7 @@ enum CYWebPolicyDecision { - (id<CyteWebViewDelegate>) delegate; - (void) dispatchEvent:(NSString *)event; - (void) reloadFromOrigin; +- (UIScrollView *) scrollView; @end diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm index 7fac96e..a71e5c2 100644 --- a/CyteKit/WebView.mm +++ b/CyteKit/WebView.mm @@ -361,6 +361,14 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [[[self _documentView] webView] reloadFromOrigin:nil]; } +- (UIScrollView *) scrollView { + if ([self respondsToSelector:@selector(_scrollView)]) + return [self _scrollView]; + else if ([self respondsToSelector:@selector(_scroller)]) + return (UIScrollView *) [self _scroller]; + else return nil; +} + @end static void $UIWebViewWebViewDelegate$_clearUIWebView(UIWebViewWebViewDelegate *self, SEL sel) { |