简体   繁体   English

presentModalViewController会接管整个iPad屏幕,而不仅仅是右侧?

[英]presentModalViewController is taking over whole iPad screen, not just right hand side?

I'm using the APSplitViewController on the iPad to get two sides. 我在iPad上使用APSplitViewController来获得两个方面。 When working within the right hand side I have a viewController that sits inside a UINavigationController . 在右侧工作时,我有一个位于UINavigationController内的viewController。

When I modally present EKEventEditViewController (as it has to be modal) it doesn't stay inside the bounds of the right hand side navController but takes over the whole iPad display, and things start getting worse from there... 当我以模态形式呈现EKEventEditViewController (因为它必须是模态的),它不会停留在右侧navController的范围内,而是会接管整个iPad的显示,并且从那里开始,情况变得越来越糟...

Is there a way to keep the modal view within the context of the local UINavigationController I'm working with on the right hand side of the screen? 有没有一种方法可以将模态视图保持在我在屏幕右侧使用的本地UINavigationController的上下文中?

EKEventEditViewController *addController = [[[EKEventEditViewController alloc] initWithNibName:nil bundle:nil] autorelease];
addController.eventStore = self.eventStore;
addController.editViewDelegate = self;
[self presentModalViewController:addController animated:YES];

PS. PS。 This is actually an issue for any simple view controller (not just EKEventEditViewController) in fact. 实际上,这实际上是任何简单视图控制器(不仅是EKEventEditViewController)的问题。 That is when trying to use a presentModalViewController. 就是在尝试使用presentModalViewController时。 A code example of how to make "presentModalViewController" work so it only takes up the right hand side would be great 一个如何使“ presentModalViewController”工作以使其仅占用右侧的代码示例将很棒

除非您编写自己的自定义presentModalViewController方法,否则不要这样做。

据我所知,最好用EKEventEditViewController更新APSplitViewController的rightViewController以在右侧边界显示EKEventEditViewController。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM