Search code examples
iosorientationxcode5uiinterfaceorientation

in ipad ios 5.0 version can't display app in landscape mode


i make application in iphone and ipad, iphone application in Portrait (bottom home button) and i make ipad application in Landscape (right home button),in ipad ios 6,7 version display app landscape mode but ios 5 can't display in landscape

screenshot for info.plist

enter image description here

ios 7 screenshot

enter image description here

ios 5 screenshot

enter image description here

please help me out


Solution

  • finally i sloved out write belove method in all ipad viewcontroller

        -(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
            return UIInterfaceOrientationLandscapeRight;
        }
        -(BOOL) shouldAutorotate {
    
            if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
                return YES;
            }
            return NO;
        }
        -(NSUInteger)supportedInterfaceOrientations{
            return UIInterfaceOrientationMaskAll;
        }
        -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
    
            if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
                if (interfaceOrientation==UIInterfaceOrientationLandscapeRight) {
    
                    return YES;
                }
            }
            return NO;
    
    }