我可以更改UIPopover动画锚点吗? [英] Can I change the UIPopover animation anchor point?
问题描述
我正在尝试使用UIPopover实现下拉菜单效果。当我将高度从0px更改为500px时,它似乎向上延伸250px并向下延伸250px ...基本上将UIPopover固定在中心的原始生成点上。我希望锚点能够成为弹出窗口的顶部,这样当我调整大小时,窗口的底部会向下动画。
I'm attempting to achieve a "drop down" menu effect with a UIPopover. When I change the height from 0px to 500px it appears to stretch 250px up and 250px down... essentially anchoring the UIPopover at the original spawn point on center. I would like the anchor to be the top of the popover, so that when I adjust the size it is the bottom of the window that animates downwards.
我注意到了如果您将UIPopover移动到屏幕顶部,则会自动发生这种情况。但是当它显示死点时我怎么能达到同样的效果?
I've noticed this happens automatically if you move the UIPopover to the top the screen. But how can I achieve the same effect when it's displaying dead center?
推荐答案
创建自己的popover怎么样?我的意思是,看起来像原始的弹出窗口,但有你想要的行为。
What about creating your own popover? I mean, something that looks like the original popover but has the behavior you want.
这篇关于我可以更改UIPopover动画锚点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!