From e530a306ecd9356ccd970dd3041dd6d986f696c5 Mon Sep 17 00:00:00 2001 From: KentuckyCompass Date: Fri, 15 Mar 2013 22:23:59 -0700 Subject: [PATCH] Don't rotate to portrait and fix iOS 6 compatibility --- ios/ViewController.mm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ios/ViewController.mm b/ios/ViewController.mm index 95fa5b4fc2..2f154fafec 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -138,9 +138,16 @@ ViewController* sharedViewController; [super dealloc]; } +// For iOS before 6.0 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return YES; + return UIInterfaceOrientationIsLandscape(toInterfaceOrientation); +} + +// For iOS 6.0 and up +- (NSUInteger)supportedInterfaceOrientations +{ + return UIInterfaceOrientationMaskLandscape; } //static BOOL menuDown = NO;