0
modalViewController = [storyboard instantiateViewControllerWithIdentifier:@"transparentFullViewController"];

listViewController.view.frame = CGRectMake(0, 0, 900, 333);
CGPoint center=modalViewController.view.center;
listViewController.view.center=center;

[modalViewController addChildViewController:listViewController];
[modalViewController.view addSubview:listViewController.view];
listViewController.view.center = [UIApplication sharedApplication].keyWindow.rootViewController.view.center;

这就是我展示模态视图控制器的方式

self.modalPresentationStyle = UIModalPresentationOverFullScreen;
self.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:modalViewController animated:NO completion:nil];

这就是它被解雇的方式

[modalViewController dismissViewControllerAnimated:NO completion:nil];

当我在 iOS 7 中关闭 modalViewController 时,它工作正常并返回到第二个屏幕截图,但是当我在 iOS 8.0 中关闭它时,视图变得扭曲,如第一个屏幕截图所示

任何帮助表示赞赏。谢谢你。扭曲的视图正常视图

4

1 回答 1

0

在 iOS 8 中尝试使用另一种演示风格:

self.modalPresentationStyle = UIModalPresentationOverCurrentContext;
于 2014-11-20T21:16:03.840 回答