My suggestion is to check the hardware of your application. To do this, use this line of code.
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
Then, as soon as you discover your hardware, block the orientation using the shouldAutorotateToInterfaceOrientation function:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { return UIInterfaceOrientationIsLandscape(orientation); }
As an example, you can do this
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) return UIInterfaceOrientationIsLandscape(orientation);
source share