草庐IT

UIModalPresentationCurrentContext

全部标签

ios - UIModalPresentationCurrentContext 和 willRotateToInterfaceOrientation

我有一个模态视图Controller(我们称它为弹出ViewController)显示在我的主视图Controller上。在某些时候,我需要看到弹出窗口后面的主视图Controller。因此,在显示弹出ViewController之前,我将modalPresentationStyle属性设置为UIModalPresentationCurrentContext。因此,当弹出ViewController以模态呈现时设备方向发生变化时,willRotateToInterfaceOrientation:和didRotateFromInterfaceOrientation:方法不会被调用。sup

ios - 在 iOS 7 中,使用 UIModalPresentationCurrentContext 进行动画模式演示不会设置动画

在iOS8中,当呈现模态(假设具有透明背景)时,我们需要设置segue(或模态)以使用UIModalPresentationOverCurrentContext的呈现样式。这按预期工作。要在iOS7上完成同样的事情,您需要将呈现ViewController设置为具有UIModalPresentationCurrentContext的模态呈现样式。这是我遇到问题的地方。我用动画呈现模态,但它没有动画。呈现后,一切正常,甚至动画解雇。此外,如果我将演示文稿样式更改为UIModalPresentationFullScreen,它会正确设置动画。我已经四处搜索并阅读了其他帖子,但找不到导致此问

iphone - UIViewController - UIModalPresentationCurrentContext 不旋转 presentingViewController

我曾经使用呈现样式UIModalPresentationCurrentContext从另一个UIViewController呈现一个UIViewController。但它不允许我旋转presentingviewcontroller(呈现新UIViewController的UIViewController)self.modalPresentationStyle=UIModalPresentationCurrentContext;NewViewController*newViewController=[[NewViewControlleralloc]initWithNibName:@"Ne

ios - definesPresentationContext/UIModalPresentationCurrentContext 问题 - 当前上下文 View Controller 丢失

这仅在您在由导航Controller管理的ViewController中呈现时才有效。复制步骤为:1-使用UIModalPresentationCurrentContext呈现ViewControllerself.definesPresentationContext=YES;ViewController*viewController=[[ViewControlleralloc]init];viewController.modalPresentationStyle=UIModalPresentationCurrentContext;[presentOnViewControllerpres

ios - 使用 UIModalPresentationCurrentContext 后如何为 View 设置动画

当我遇到thispost时,我正在四处寻找有关如何在iOS的对话框中包装View的解决方案。,其中有这一行:vc.modalPresentationStyle=UIModalPresentationCurrentContext;它基本上解决了我创建/模仿对话框的问题,但它不会像帖子中提到的那样在转换时设置动画。那么最简单的获取上滑动画的方法是什么?ps.我会问这个作为那个帖子的子问题,但我没有50个代表评论:( 最佳答案 好吧,一旦显示了您的View,您就可以在其中制作几乎任何您想要的动画。你可以做一个简单的[UIViewanima

iphone - 当 modalPresentationStyle 设置为 UIModalPresentationCurrentContext 时没有动画

当我将父UINavigationController的modalPresentationStyle设置为UIModalPresentationCurrentContext来呈现我的UIViewController时,UIViewController没有滑入。没有使用过渡。这是我的代码:UIViewController*viewController=[[UIViewControlleralloc]init];UINavigationController*navController=[[UINavigationControlleralloc]initWithRootViewControll