In Apple\'s official Maps app for the iPhone, there is a small \'page curl\' button in the lower-right corner. When you press it, the map itself peels back to reveal some optio
As cprcrack points out, this doesn't answer the original question. However, it's useful information, so with that in mind I'm going to leave it here.
This is actually much simpler than you'd guess.
We'll call the view controllers MapViewController
and SettingsViewController
. Your problem is you want to peel back part (and only part) of MapViewController
to show SettingsViewController
.
Here's how you do it:
SettingsViewController
's view.UIModalTransitionStylePartialCurl
to transition between them, like you already are.iOS will detect that you've done this automatically and only peel MapViewController
's view back far enough to the bottom half of SettingsViewController
's view, which is where all your content is.
If you put content in the top half of SettingsViewController
's view, iOS will detect that and peel back MapViewController
s view all the way instead.
Summary: Put content only in the bottom half of your new view. iOS will figure it out.
(I don't think this is documented anywhere, sorry.)
Override the viewWillDisappear
method of your underMapViewController
with something like this:
- (void)viewWillDisappear:(BOOL)animated
{
curlableMapViewController.view.frame = CGRectMake(0.f, 0.f, 320.f, 416.f);
[super viewWillDisappear:animated];
}
That corrects the size of the view of the curlableMapViewController
to the know size you specify, which you could save earlier in the viewWillAppear
method, for example.