From 8ccc957f4a260d2c506e68830e13def775eafaf6 Mon Sep 17 00:00:00 2001 From: Ian Fischer Date: Tue, 4 Aug 2015 16:45:26 -0700 Subject: [PATCH] A couple of pieces of polish for iOS. - Make space for the iOS status bar. - Set the iOS status bar to use white text. --- sky/shell/ios/Info.plist | 3 +++ sky/shell/ios/sky_surface.mm | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/sky/shell/ios/Info.plist b/sky/shell/ios/Info.plist index 41a8e6c4d..ddc2266bd 100644 --- a/sky/shell/ios/Info.plist +++ b/sky/shell/ios/Info.plist @@ -35,6 +35,9 @@ armv7 + UIViewControllerBasedStatusBarAppearance + + diff --git a/sky/shell/ios/sky_surface.mm b/sky/shell/ios/sky_surface.mm index 6f8387117..f9e2e8057 100644 --- a/sky/shell/ios/sky_surface.mm +++ b/sky/shell/ios/sky_surface.mm @@ -100,6 +100,10 @@ static sky::InputEventPtr BasicInputEventFromRecognizer( metrics->physical_width = size.width * scale; metrics->physical_height = size.height * scale; metrics->device_pixel_ratio = scale; + metrics->padding_top = + [UIApplication sharedApplication].statusBarFrame.size.height; + + [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO]; _sky_engine->OnViewportMetricsChanged(metrics.Pass()); } -- GitLab