The iOS 7 transparent status bar now uses white text rather than black. iOS-improvements
authorAlex Szpakowski <slime73@gmail.com>
Wed, 16 Jul 2014 20:05:00 -0300
branchiOS-improvements
changeset 9492 cad5a9995bde
parent 9491 c652f2655d2a
child 9493 961d593034b5
The iOS 7 transparent status bar now uses white text rather than black.
src/video/uikit/SDL_uikitopenglview.m
src/video/uikit/SDL_uikitviewcontroller.h
src/video/uikit/SDL_uikitviewcontroller.m
--- a/src/video/uikit/SDL_uikitopenglview.m	Wed Jul 16 16:12:20 2014 -0300
+++ b/src/video/uikit/SDL_uikitopenglview.m	Wed Jul 16 20:05:00 2014 -0300
@@ -169,8 +169,9 @@
     animationCallback = callback;
     animationCallbackParam = callbackParam;
 
-    if (animationCallback)
+    if (animationCallback) {
         [self startAnimation];
+    }
 }
 
 - (void)startAnimation
--- a/src/video/uikit/SDL_uikitviewcontroller.h	Wed Jul 16 16:12:20 2014 -0300
+++ b/src/video/uikit/SDL_uikitviewcontroller.h	Wed Jul 16 20:05:00 2014 -0300
@@ -36,5 +36,6 @@
 - (NSUInteger)supportedInterfaceOrientations;
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
 - (BOOL)prefersStatusBarHidden;
+- (UIStatusBarStyle)preferredStatusBarStyle;
 
 @end
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Jul 16 16:12:20 2014 -0300
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Wed Jul 16 20:05:00 2014 -0300
@@ -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 */