gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 03:38:17 25 4
gpt4 key购买 nike

在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com