summaryrefslogtreecommitdiff
path: root/UICaboodle/BrowserView.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-12-01 23:04:06 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-12-02 00:51:45 -0800
commit8d603a7de7b0e5e8f72eabe6b2307c4dfff5b663 (patch)
treeca0398fd12c74ade32ce2c8d0886b2fd3e931642 /UICaboodle/BrowserView.mm
parentc83a464deed8ccb97a5fc47cb699a93d50f7477d (diff)
Only run the UIActivityIndicatorView animation while visible.
Diffstat (limited to 'UICaboodle/BrowserView.mm')
-rw-r--r--UICaboodle/BrowserView.mm11
1 files changed, 7 insertions, 4 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index db8719c..5fd65c2 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -890,11 +890,15 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
if ([self isLoading]) {
[[self navigationItem] setRightBarButtonItem:loadingitem_ animated:YES];
[self performSelector:@selector(layoutRightButton) withObject:nil afterDelay:0];
+
+ [indicator_ startAnimating];
[self applyLoadingTitle];
- } else if (custom_ != nil) {
- [[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES];
} else {
- [[self navigationItem] setRightBarButtonItem:[self rightButton] animated:YES];
+ [indicator_ stopAnimating];
+
+ [[self navigationItem] setRightBarButtonItem:(
+ custom_ != nil ? [self customButton] : [self rightButton]
+ ) animated:YES];
}
}
@@ -1009,7 +1013,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
indicator_ = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
[indicator_ setFrame:CGRectMake(15, 5, [indicator_ frame].size.width, [indicator_ frame].size.height)];
- [indicator_ startAnimating];
[webview_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
[indicator_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin];