Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在视图旋转后更改 UIPopover 的位置。你能告诉我在视图旋转后调用什么方法,以便我可以在视图旋转后渲染的最终视图中获取 UI 元素的坐标
任何 Apple 原生应用程序中的弹出窗口行为。您会看到响应设备旋转弹出框应该在旋转动画之前消失,并在它结束后再次出现在新的适当位置。所以你应该关闭你的弹出框,然后用新的坐标在新的地方弹出它(如何获得这些坐标)
提前感谢
从文档中-[UIViewController didRotateFromInterfaceOrientation:]:
-[UIViewController didRotateFromInterfaceOrientation:]
用户界面旋转后发送到视图控制器。... 子类可能会覆盖此方法以在轮换后立即执行其他操作。… 调用此方法时,该interfaceOrientation属性已设置为新方向。
interfaceOrientation