summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index 07a92ee..d5116cf 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -601,6 +601,17 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
closer_ = [function retain];
}
+- (void) scrollToBottomAnimated:(NSNumber *)animated {
+ CGSize size([scroller_ contentSize]);
+ CGPoint offset([scroller_ contentOffset]);
+ CGRect frame([scroller_ frame]);
+
+ if (size.height - offset.y < frame.size.height + 20.f) {
+ CGRect rect = {{0, size.height-1}, {size.width, 1}};
+ [scroller_ scrollRectToVisible:rect animated:[animated boolValue]];
+ }
+}
+
- (void) _setViewportWidth {
[[webview_ _documentView] setViewportSize:CGSizeMake(width_, UIWebViewGrowsAndShrinksToFitHeight) forDocumentTypes:0x10];
}