diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 16:16:44 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 17:01:07 -0800 |
commit | 8dbdaafa2948a9c2fb180a9571bf3bb0a669b934 (patch) | |
tree | ba9a5991cbcba7b1b8a6521b3416e5ca0ec3b2ea /UICaboodle/BrowserView.mm | |
parent | 673a6e1ab4f3aab438db5281785b516c3c151e48 (diff) |
Use setViewportWidth: only on main thread.
Diffstat (limited to 'UICaboodle/BrowserView.mm')
-rw-r--r-- | UICaboodle/BrowserView.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index d549640..43f2905 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -646,6 +646,14 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [self _setViewportWidth]; } +- (void) _setViewportWidthOnMainThread:(NSNumber *)width { + [self setViewportWidth:[width floatValue]]; +} + +- (void) setViewportWidthOnMainThread:(float)width { + [self performSelectorOnMainThread:@selector(_setViewportWidthOnMainThread:) withObject:[NSNumber numberWithFloat:width] waitUntilDone:NO]; +} + - (void) webViewUpdateViewSettings:(UIWebView *)view { [self _setViewportWidth]; } |