It is easy to change orientation of the iPad/iPhone simulators by following: hardware->rotate left or right. But, how can I change it on iDevice (iPad device or iPhone device?)
please can somebody help me?
should I add some code?
Go to you summary tab, scroll down the to go "iPad Deployment Info". Unselect all the four options in "Supported Interface Orientations". Then select again, but select Portrait first and remaining after.
Also in View that you are expecting to be in portrait mode, just add
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
{
return (orientation == UIInterfaceOrientationMaskAll);
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
Hope this helps.