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

旧巷老猫 提交于 2019-12-09 19:30:34

问题


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:

  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.




回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!