diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2013-09-30 02:43:57 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2013-09-30 02:43:57 -0700 |
commit | 5328a9f0bf341336a415f9465e53097e00c0948c (patch) | |
tree | c6041fc1ec3b2ed195c27cf705970e96e751f789 /CyteKit | |
parent | 6415105ee187c512c2cd85616dbc9b5f41ae402c (diff) |
Fix the position of the loading indicator on iOS 7.
Diffstat (limited to 'CyteKit')
-rw-r--r-- | CyteKit/WebViewController.mm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 5846a66..15e7a96 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -850,14 +850,24 @@ float CYScrollViewDecelerationRateNormal; ] autorelease]; loadingitem_ = [[[UIBarButtonItem alloc] - initWithTitle:@" " + initWithTitle:(kCFCoreFoundationVersionNumber >= 800 ? @" " : @" ") style:UIBarButtonItemStylePlain target:self action:@selector(reloadButtonClicked) ] autorelease]; - indicator_ = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease]; - [indicator_ setFrame:CGRectMake(15, 5, [indicator_ frame].size.width, [indicator_ frame].size.height)]; + UIActivityIndicatorViewStyle style; + float left; + if (kCFCoreFoundationVersionNumber >= 800) { + style = UIActivityIndicatorViewStyleGray; + left = 7; + } else { + style = UIActivityIndicatorViewStyleWhite; + left = 15; + } + + indicator_ = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:style] autorelease]; + [indicator_ setFrame:CGRectMake(left, 5, [indicator_ frame].size.width, [indicator_ frame].size.height)]; [indicator_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin]; [self applyLeftButton]; |