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

元气小坏坏 提交于 2019-12-12 02:15:22

问题


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


回答1:


As far as i know, it's better to update rightViewController of your APSplitViewController with EKEventEditViewController to display EKEventEditViewController in bounds of right side.




回答2:


Not unless you write your own custom presentModalViewController methods.



来源:https://stackoverflow.com/questions/7991305/presentmodalviewcontroller-is-taking-over-whole-ipad-screen-not-just-right-hand

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!