diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2012-11-16 09:24:41 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-02-27 23:55:45 +0100 |
commit | fa731cddd16aed426f7c73bf4807475f0b087d4c (patch) | |
tree | bc9e03ad6a0f9ad5b5bc9746eb8bb1e0eda8a645 /src/plugins/platforms/ios/qtmain.mm | |
parent | 72f66a8ee57ad3865d25e0157179d042a474cfff (diff) |
iOS: add QIOSViewController
We need our own viewcontroller to better control which
orientations iOS can enter, and also ito be able to
stop auto-rotation.
We stop auto-rotation to happend by default, since this is
how Qt wants it (it is seen as the responsibility of the
application).
Change-Id: Id07a96e355396752fffd28984af528aeb0b7c3e3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qtmain.mm')
-rw-r--r-- | src/plugins/platforms/ios/qtmain.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qtmain.mm b/src/plugins/platforms/ios/qtmain.mm index 9b4ce9918e..61756edc93 100644 --- a/src/plugins/platforms/ios/qtmain.mm +++ b/src/plugins/platforms/ios/qtmain.mm @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qiosapplicationdelegate.h" +#include "qiosviewcontroller.h" int main(int argc, char *argv[]) { @@ -58,7 +59,7 @@ extern int qt_main(int argc, char *argv[]); if (!self.window) { // If not, we create one ourselves self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - UIViewController *controller = [[UIViewController alloc] init]; + QIOSViewController *controller = [[QIOSViewController alloc] init]; self.window.rootViewController = controller; controller.view = [[UIView alloc] init]; |