简体   繁体   English

为什么模式视图(由详细视图控制器呈现)呈现视图控制器是拆分视图控制器?

[英]Why modal view's (presented by detail view controller) presenting view controller is split view controller?

I have a very simple split view controller with a master view controller and another detail view controller. 我有一个非常简单的拆分视图控制器,其中包含一个主视图控制器和另一个详细视图控制器。

I put a modal segue between detail view controller and another view controller (A). 我在细节视图控制器和另一个视图控制器(A)之间放置了模式选择。 When I inspect the A's presenting view controller, it is the split view controller instead of detail view controller. 当我检查A的呈现视图控制器时,它是拆分视图控制器,而不是详细视图控制器。

My question is since the fact is detail view controller segued to A, why A's presenting view controller is split view controller? 我的问题是,由于事实视图控制器被隔离到A,为什么A的呈现视图控制器是拆分视图控制器?

rdelmar is right, but I was still having this occur sporadically when placing definesPresentationContext in code and setting Presentation to Current Context in the storyboard. rdelmar是正确的,但是当在代码中放置definePresentationContext并将情节提要中的Presentation设置为Current Context时,我仍然偶尔会发生这种情况。 I had to check Defines Context in the storyboard as well. 我还必须在情节提要中检查“定义上下文”。

In short, the presenting view controller should have Presentation=Current Context, and a check beside Defines Context in storyboard. 简而言之,演示视图控制器应具有Presentation = Current Context,并在情节提要中的Defines Context旁边打勾。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 呈现视图控制器之上的模态视图控制器 - Modal view controller over Presenting view controller 模态视图控制器未调用呈现视图控制器的dismissModalViewControllerAnimated:方法 - modal view controller not calling presenting view controller's dismissModalViewControllerAnimated: method 在模态视图控制器中更新呈现视图控制器的属性 - Updating a presenting view controller's property inside the modal view controller 为什么在applicationDidFinishLaunchingWithOptions中未显示模态视图控制器? - Why is the modal view controller not being presented in applicationDidFinishLaunchingWithOptions? 延迟呈现模式视图控制器 - Delay in presenting a modal view controller 如何在呈现的View Controller和呈现的View Controller之间建立关系? - How to setup a relationship between the presenting View Controller and the presented View Controller? 呈现视图 controller 位于呈现视图 controller 下方 - Presented view controller place under presenting view controller 使用CAShapeLayer遮罩呈现的视图控制器,也遮罩呈现的视图控制器 - masking presented view controller with CAShapeLayer also mask the presenting view controller 如何暂时隐藏同时呈现视图控制器的呈现视图控制器 - How to temporarily hide a presented View controller that is also presenting a view controller 呈现视图 controller 也可以是呈现视图 controller 吗? - Can a presented view controller also be a presenting view controller?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM