summaryrefslogtreecommitdiff
path: root/CyteKit
diff options
context:
space:
mode:
Diffstat (limited to 'CyteKit')
-rw-r--r--CyteKit/WebView.mm8
-rw-r--r--CyteKit/WebViewController.mm3
2 files changed, 11 insertions, 0 deletions
diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm
index a71e5c2..09c9c40 100644
--- a/CyteKit/WebView.mm
+++ b/CyteKit/WebView.mm
@@ -369,6 +369,14 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
else return nil;
}
+- (void) setNeedsLayout {
+ [super setNeedsLayout];
+
+ WebFrame *frame([[[self _documentView] webView] mainFrame]);
+ if ([frame respondsToSelector:@selector(setNeedsLayout)])
+ [frame setNeedsLayout];
+}
+
@end
static void $UIWebViewWebViewDelegate$_clearUIWebView(UIWebViewWebViewDelegate *self, SEL sel) {
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 36c8177..4d4d250 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -1060,6 +1060,9 @@ float CYScrollViewDecelerationRateNormal;
if ([self hidesNavigationBar])
[self _setHidesNavigationBar:YES animated:animated];
+ // XXX: why isn't this evern called automatically?
+ [[self webView] setNeedsLayout];
+
[self dispatchEvent:@"CydiaViewWillAppear"];
[super viewWillAppear:animated];
}