objective-c - 呈现以 iPad iOS 6 为中心的 View Controller 时出错

标签 objective-c ios ios5 uinavigationcontroller ios6

在 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, 0, 250, 250);

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

但在 iOS6 中无法正常工作, View 不会保持在屏幕中心,无论是纵向还是横向。 有什么解决办法吗?

谢谢!! :)

最佳答案

我认为如果您删除 UIModalTransitionStyleFlipHorizo​​ntal 过渡样式并改用其他过渡样式之一,它会起作用。

这似乎是 UIModalTransitionStyleFlipHorizo​​ntal 的错误。

关于objective-c - 呈现以 iPad iOS 6 为中心的 View Controller 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12563798/

相关文章:

ios - 找不到符号 : kUTTypeImage

ios - 在 Objective-C Typhoon 中使用依赖注入(inject)和 JSON 连接对象

ios - 如何使用 HP SCA 扫描我的 iOS 项目并获取报告

ios - 需要有关 iOS 的 BDD 的建议

iphone - 导航栏后退按钮,文本未居中对齐

ios - 我应该如何实现自定义表格 View 单元格?

ios - CGFloat 返回 +Inf

ios - 排序日期数组排序升序 swift

ios - 不小心删除了我的 KeyChain Access 中的 key ,现在无法放入新 key

iphone - 我希望今天支持哪些 iOS 版本?