summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-12-01 23:00:25 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-12-02 00:51:45 -0800
commitc83a464deed8ccb97a5fc47cb699a93d50f7477d (patch)
treee0155eff75e1cc74ba66d95bf8f079d26000a9f7 /UICaboodle
parent71cc7be109c603c3dcd7e08fbe440707c4f652de (diff)
Fix reload button layout on 2.x browser.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index bacc40b..db8719c 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -881,11 +881,15 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
[[self navigationItem] setTitle:UCLocalize("LOADING")];
}
+- (void) layoutRightButton {
+ [[loadingitem_ view] addSubview:indicator_];
+ [[loadingitem_ view] bringSubviewToFront:indicator_];
+}
+
- (void) applyRightButton {
if ([self isLoading]) {
[[self navigationItem] setRightBarButtonItem:loadingitem_ animated:YES];
- // XXX: why do we do this again here? (if we don't, just remove indicator_)
- [[loadingitem_ view] addSubview:indicator_];
+ [self performSelector:@selector(layoutRightButton) withObject:nil afterDelay:0];
[self applyLoadingTitle];
} else if (custom_ != nil) {
[[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES];
@@ -1006,7 +1010,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];
- [[loadingitem_ view] addSubview:indicator_];
[webview_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
[indicator_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin];