From 231a4a11011f9feb35b1eb41846f09d12b79e1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 26 Sep 2014 15:06:46 +0200 Subject: iOS: Move statusbar visibility handling to QIOSViewController It doesn't belong in QIOScreen, and simplifies the flow when changing the focus window or the window state of the focus window. Both will result in calling updateProperties on the view-controller, which will re-configure the statusbar visibility and hide/show it as appropriate, before triggering a re-layout of its own view, which will in turn trigger an update of the screen properties based on the new statusbar state, before re-layouting of QWindow based on the new screen state. Change-Id: I89077a3fb5f843949ce833e4e727d2c753ea2eb6 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/quiview.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/plugins/platforms/ios/quiview.mm') diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 4e720941f9..272441b41c 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -43,6 +43,7 @@ #include "qiosglobal.h" #include "qiosintegration.h" +#include "qiosviewcontroller.h" #include "qioswindow.h" #include "qiosmenu.h" @@ -368,6 +369,15 @@ return nil; } +- (QIOSViewController*)qtViewController +{ + UIViewController *vc = self.viewController; + if ([vc isKindOfClass:QIOSViewController.class]) + return static_cast(vc); + + return nil; +} + @end // Include category as an alternative to using -ObjC (Apple QA1490) -- cgit v1.2.3