Commit b21544c1dd6295646e4193b02952e38ef0004bd1

Alex Szpakowski 2014-07-16T20:05:00

The iOS 7 transparent status bar now uses white text rather than black.

diff --git a/src/video/uikit/SDL_uikitopenglview.m b/src/video/uikit/SDL_uikitopenglview.m
index 91f6905..80335e7 100644
--- a/src/video/uikit/SDL_uikitopenglview.m
+++ b/src/video/uikit/SDL_uikitopenglview.m
@@ -169,8 +169,9 @@
     animationCallback = callback;
     animationCallbackParam = callbackParam;
 
-    if (animationCallback)
+    if (animationCallback) {
         [self startAnimation];
+    }
 }
 
 - (void)startAnimation
diff --git a/src/video/uikit/SDL_uikitviewcontroller.h b/src/video/uikit/SDL_uikitviewcontroller.h
index cc14d4c..64cb47e 100644
--- a/src/video/uikit/SDL_uikitviewcontroller.h
+++ b/src/video/uikit/SDL_uikitviewcontroller.h
@@ -36,5 +36,6 @@
 - (NSUInteger)supportedInterfaceOrientations;
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
 - (BOOL)prefersStatusBarHidden;
+- (UIStatusBarStyle)preferredStatusBarStyle;
 
 @end
diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m
index 3bedcc4..433b91b 100644
--- a/src/video/uikit/SDL_uikitviewcontroller.m
+++ b/src/video/uikit/SDL_uikitviewcontroller.m
@@ -124,6 +124,16 @@
     }
 }
 
+- (UIStatusBarStyle)preferredStatusBarStyle
+{
+#ifdef __IPHONE_7_0
+    return UIStatusBarStyleLightContent;
+#else
+    /* This is only called in iOS 7+, so the return value isn't important. */
+    return UIStatusBarStyleBlackTranslucent;
+#endif
+}
+
 @end
 
 #endif /* SDL_VIDEO_DRIVER_UIKIT */