3

I need to have some additional data presented for a view in an application, and I'd like to implement it using a partial page curl in the same way that the Google Maps application uses a partial page curl for its settings.

The problem I've got is that the presented view takes up the entire screen:

enter image description here

How can I resize the view that's presented? Ideally, I'd like it to occupy the bottom right-hand corner the same way the Google Maps application does.

Andrew
  • 11,894
  • 12
  • 69
  • 85

2 Answers2

7

I've tested this a good bit, and it appears that the following statements are true:

  1. UIModalTransitionStylePartialCurl has a MINIMUM curl of about half of the page.
  2. There is nothing (that I could find) that will prevent this MINIMUM.
  3. You can affect the amount of curl (between half-page and full-page) by the placement of your content in the UIViewController you "reveal".

So, in the second image you've shown, it makes perfect sense to me that the partial curl goes up about halfway. It also explains why your initial image appears the way it does.

Also, if you look at Google Maps, they appear to be using some sort of proprietary/private API to get their partial curl. Or maybe it's because they're using a down-sized UIViewController. In any case, I hope this helps you get closer to your goal.

mbm29414
  • 11,558
  • 6
  • 56
  • 87
  • From the experimentation I've done over the last few days, I think you're spot on. – Andrew Apr 17 '12 at 20:22
  • 1
    Glad I could help! This definitely cause me some heartburn for a few days a while ago... – mbm29414 Apr 19 '12 at 14:53
  • 1
    that's a shame this is not documented, but it works. just don't add any subviews higher than the half of the controller.view.frame.size.height – Vassily Jun 26 '12 at 13:45
  • THX. I was trying to do exactly the same (changing the min-size of the partial curl. Do you know by the way if its possible to change the orientation of the curl? e.g. from bottom-up to right-left like it does the maps application on ipad – Hons Aug 07 '12 at 14:38
1

Ok, so partially in the category of "my bad". I was previously displaying a UITableViewController, which I don't think I want to do. I do want a table, however — but it's just got a few rows in it. I've switched to using a normal UIViewController subclass that manages a small table view.

The modal view is still far too big, however:

enter image description here

The question remains — what can I do to influence the size of the curl that IOS generates for me?

Andrew
  • 11,894
  • 12
  • 69
  • 85