
In my iPad application, i want to change the orientation as landscape only.. how could i be done? Currently i'm using
// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
Please help. Thanks in advance!

To fix the orientation to landscape only ... either comment or delete the "return YES" and instead of it write ..
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
See the code given below..
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//return YES;
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.