I have recently converted my IPad application into a Universal Application. I am re-using a lot of views from my IPad version to the IPhone version.
The IPad needs to support all orientations, is there a way to specify the IPad version to allow any orientation, but IPhone to just allow portrait?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && interfaceOrientation != UIInterfaceOrientationPortrait)
{
return NO;
}
else
{
return YES;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With