简体   繁体   中英

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

I'm using the APSplitViewController on the iPad to get two sides. When working within the right hand side I have a viewController that sits inside a UINavigationController .

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...

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?

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

PS. This is actually an issue for any simple view controller (not just EKEventEditViewController) in fact. That is when trying to use a presentModalViewController. A code example of how to make "presentModalViewController" work so it only takes up the right hand side would be great

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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