views:

150

answers:

1

Im struggling to lock orientation of a webapp. For example want the site to be permanently in orientation view.

And advice appreciated.

A: 

Use this method of UIViewController - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation and test if the interfaceOrientation is equal to UIInterfaceOrientation you want, in this case return YES else NO.

typedef enum {
   UIInterfaceOrientationPortrait           = UIDeviceOrientationPortrait,
   UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
   UIInterfaceOrientationLandscapeLeft      = UIDeviceOrientationLandscapeRight,
   UIInterfaceOrientationLandscapeRight     = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;
Kick
The question seems to be webapp specific so native code isn't an option
michael