我在iphone和ipad中应用程序,在Portrait中使用iphone应用程序(底部主页按钮),我在横向(右主页按钮)中制作ipad应用程序,在ipad ios 6,7版本显示应用程序横向模式但是ios 5不能在风景中显示
info.plist的截图
ios 7截图
ios 5截图
请帮帮我
答案 0 :(得分:1)
试试这个? - orientation is not working in ios 5 and it is working in ios 6
在iOS 5和6 +之间如何处理方向更改。
答案 1 :(得分:1)
最后我在所有ipad viewcontroller
中解决了写belove方法的问题 -(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;
}