The iOS 7 transparent status bar now uses white text rather than black.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
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 */