问题
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