Search code examples
ios5modalviewcontrollerpage-curl

How do I influence the size of a modal view presented with a partial page curl?


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.


Solution

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