问题
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:
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.
回答1:
I've tested this a good bit, and it appears that the following statements are true:
- UIModalTransitionStylePartialCurl has a MINIMUM curl of about half of the page.
- There is nothing (that I could find) that will prevent this MINIMUM.
- 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.
回答2:
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:
The question remains — what can I do to influence the size of the curl that IOS generates for me?
来源:https://stackoverflow.com/questions/10183079/how-do-i-influence-the-size-of-a-modal-view-presented-with-a-partial-page-curl