jjzjj

presentingViewController

全部标签

ios - self.presentingViewController 在 iOS 8 上损坏了吗?

我遇到了一些非常奇怪的事情:创建一个非常基本的单View项目,并将第二个ViewController添加到Storyboard,以及从第一个到第二个的模式转场。从ViewController启动segue并使用performSegueWithIdentifier:以编程方式触发它。在模态呈现的ViewController的viewDidLoad中,添加此日志:NSLog(@"%@",self.presentingViewController);现在在iOS7上运行该应用程序,您应该会得到如下日志:这只是应用程序初始ViewController的引用,它呈现了模态视图Controller

ios - 在交互式关闭期间对 presentingViewController 进行动画更改

我正在研究类似于Mail.app的打开草稿行为的UIPresentationController子类。呈现ViewController时,它不会一直到达顶部,呈现ViewController会缩小,就好像它正在回退一样。它的基本要点如下:classCustomPresentationController:UIPresentationController{//Createa40ptspaceabovetheview.overridefuncframeOfPresentedViewInContainerView()->CGRect{letframe=super.frameOfPresent

ios - ViewController 的 presentingViewController 设置错误?

如果ViewControllerA嵌入到navigationController中,并且ViewControllerB由ViewControllerA模态呈现。当我打印ViewControllerB的presentingViewController属性时,我发现presentingViewController指向导航Controller,而不是ViewControllerA。但是我觉得如果presentingViewController指向ViewControllerA更合理。 最佳答案 Butithinkifthepresenti

ios - 使用 presentingViewController 关闭 viewController

我有三个ViewController,它的顺序是(ApresentBwhichpresentsC),当我留在CviewController中时,我必须将ViewController解散到BviewController。对于CviewController,它的presentingViewCONtroller是BviewController当然,我可以用[selfdismissViewControllerAnimated:YEScompletion:NULL];//selfmeansCViewController但我想知道我还可以使用以下方法:[self.presentingViewCon

ios - 使用 presentViewController :animated:completion: in iOS 8 时 presentingViewController 为 nil

想知道最近是否有其他人遇到过这个问题......对于我的一个ViewController,仅在iOS8上,在调用presentViewController:animated:completion:之后,呈现的ViewController将self.presentingController设为nil。在iOS7上没问题,在另一个ViewController上也不会发生。documentation说应该设置它,只要呈现的ViewController是模态呈现的。鉴于它适用于iOS7,这可能是iOS8的错误吗?我已经能够使用View容器包含方法绕过它,但如果有人以前见过这个并且知道触发此行为

ios - 如何检查 View Controller 是否以模态方式呈现或推送到导航堆栈上?

如何在我的ViewController代码中区分:模态呈现推送到导航堆栈presentingViewController和isMovingToParentViewController在这两种情况下都是YES,所以不是很有帮助。让事情变得复杂的是,我的父ViewController有时是模态的,要检查的ViewController被推送到它上面。原来我的问题是我将我的HtmlViewController嵌入到UINavigationController中,然后显示。这就是为什么我自己的尝试和下面的好答案都不起作用的原因。HtmlViewController*termsViewContro

ios - 如何检查 View Controller 是否以模态方式呈现或推送到导航堆栈上?

如何在我的ViewController代码中区分:模态呈现推送到导航堆栈presentingViewController和isMovingToParentViewController在这两种情况下都是YES,所以不是很有帮助。让事情变得复杂的是,我的父ViewController有时是模态的,要检查的ViewController被推送到它上面。原来我的问题是我将我的HtmlViewController嵌入到UINavigationController中,然后显示。这就是为什么我自己的尝试和下面的好答案都不起作用的原因。HtmlViewController*termsViewContro