在iPad iOS 6中呈现视图控制器时出错 [英] Error to present view controller centered in iPad iOS 6
本文介绍了在iPad iOS 6中呈现视图控制器时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在iOS 5中它运行正常:
In iOS 5 it runs correctly:
PinRequiredViewController *pinView = [[PinRequiredViewController alloc]initWithNibName:@"PinRequiredView" bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pinView];
// show the navigation controller modally
navController.modalPresentationStyle = UIModalPresentationFormSheet;
navController.modalInPopover = NO;
navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:navController animated:YES completion:nil];
navController.view.superview.frame = CGRectMake(0, 0, 250, 250);
navController.view.superview.center = self.view.window.center;
但是在iOS6中工作不正常,视图并没有保持在屏幕中心,包括肖像和风景。
任何解决方案?
But not working fine in iOS6, the view does not stay centered in the screen, both portrait and landscape. Any solutions?
谢谢!! :)
推荐答案
我认为如果你删除 UIModalTransitionStyleFlipHorizontal
转换样式并使用其他转换样式之一。
I think it'll work if you remove the UIModalTransitionStyleFlipHorizontal
transition style and use one of the other transition styles instead.
似乎是 UIModalTransitionStyleFlipHorizontal
的错误。
这篇关于在iPad iOS 6中呈现视图控制器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文