当前位置: 动力学知识库 > 问答 > 编程问答 >

ios5 - 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:

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.

网友答案:

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.

网友答案:

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?

分享给朋友:
您可能感兴趣的文章:
随机阅读: