Start a new topic

Lock screen rotation

Lock screen rotation


How can I lock the screen rotation for the architect world in ios7?

Hi,
To help you answering your question, we need some more information ;)
* Which platform (iOS, Android)
* Native SDK, PhoneGap or Titanium
 

If you're using the native SDK, there should be somewhere a snippet in your view controller which looks like this:

#pragma mark - Orientation handling iOS 6 + 7

- (BOOL)shouldAutorotate

{

    return YES;

}

- (NSUInteger)supportedInterfaceOrientations

{

    return UIInterfaceOrientationMaskAll;

}

#pragma mark Orientation handling iOS 5

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation

{

    return YES;

}

#pragma mark Orientation handling Wikitude

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

{

    if (UIInterfaceOrientationIsPortrait(toInterfaceOrientation)) {

        ;

    }

}

 

Simply return the appropriate values in the methods and set the interface orientation for the Wikitude SDK.

Best regards

Andreas

Its for Phonegap and Im using xcode 5.0.2

Hi,
So the rest of your application behaves as you want to?

You could do it manually in the WTARViewController.m file. Simply replace the existing methods with the ones from my last answer.
If you don't feel comftable with this solution, you could try out our latest PhoneGap Plugin in combination with our latest beta SDK. To get both, simply send us a email and we will send it to you.

Best regards

Andreas
Login or Signup to post a comment