From 18169cfd9bd3118f4c7c3b214482c912509288be Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 7 Mar 2011 14:05:47 -0800 Subject: Do not update webviews that are not rendered. --- CyteKit/WebViewController.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CyteKit') diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 520faa2..4dc94ef 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -775,6 +775,9 @@ float CYScrollViewDecelerationRateNormal; [preferences setJavaScriptCanOpenWindowsAutomatically:YES]; [preferences setOfflineWebApplicationCacheEnabled:YES]; + if ([webview respondsToSelector:@selector(setShouldUpdateWhileOffscreen:)]) + [webview setShouldUpdateWhileOffscreen:NO]; + #if LogMessages if ([document respondsToSelector:@selector(setAllowsMessaging:)]) [document setAllowsMessaging:YES]; -- cgit v1.2.3