objective-c – 以iPad iOS 6为中心呈现视图控制器时出错

前端之家收集整理的这篇文章主要介绍了objective-c – 以iPad iOS 6为中心呈现视图控制器时出错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在iOS 5中,它运行正常:
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,250,250);

            navController.view.superview.center = self.view.window.center;

但是在iOS6中工作不正常,视图不会在屏幕中保持居中,包括纵向和横向.
解决方案吗

谢谢!! 原文链接:https://www.f2er.com/c/117169.html

猜你在找的C&C++相关文章