Im struggling to lock orientation of a webapp. For example want the site to be permanently in orientation view.
And advice appreciated.
Im struggling to lock orientation of a webapp. For example want the site to be permanently in orientation view.
And advice appreciated.
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;