]> git.saurik.com Git - cydia.git/commitdiff
Fix the position of the loading indicator on iOS 7.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 30 Sep 2013 09:43:57 +0000 (02:43 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 30 Sep 2013 09:43:57 +0000 (02:43 -0700)
CyteKit/WebViewController.mm

index 5846a66f8de1ceb1983e73280ac9127954a652fe..15e7a96269ac2cf3176313cc6d437cb66817529c 100644 (file)
@@ -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];