My iPhone application is displaying some odd behavior when run on the iPad with respect to supporting orientation changes.
The app starts up with a view controller (
Here is some code i'm using to prevent that error:
- (void)viewDidLoad {
if (self.interfaceOrientation == UIInterfaceOrientationPortrait) {
self.view.transform = CGAffineTransformIdentity;
self.view.transform = CGAffineTransformMakeRotation(M_PI/2);
self.view.bounds = CGRectMake(0.0, 0.0, 480, 320);
}
[UIView commitAnimations];
}
and
- (void)viewDidLoad {
if (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
self.view.transform = CGAffineTransformIdentity;
self.view.transform = CGAffineTransformMakeRotation(-(M_PI / 2));
self.view.bounds = CGRectMake(0, 0, 320, 480);;
}
[UIView commitAnimations];
}
Based on what orientation the device is in, you will need to modify some of the code.