gpt4 book ai didi

iOS 8 : How to implement a rotating view controller on top of a portrait-only app?

转载 作者:行者123 更新时间:2023-12-01 16:39:04 25 4
gpt4 key购买 nike

我的应用程序仅是纵向的,除了一个 View Controller (全屏图像查看器),它使用自定义过渡动画以模态方式呈现。

只要应用程序是针对 iOS 7 SDK 构建的,它就可以在 iOS 7 和 8 上正常运行。当我针对 iOS 8 SDK 进行编译时,我遇到了在 iOS 8 上运行的界面旋转问题:当图像查看器旋转到横向然后关闭时,呈现 View Controller 的布局被破坏。它回到纵向,但具有横向尺寸。所以屏幕底部是黑色的。

可能是什么原因?目前,我只使用 iOS 7 界面定向方法,如 -supportedInterfaceOrientations , -shouldAutorotate-willRotateToInterfaceOrientation:duration: .由于我仍然需要 iOS 7 兼容性,我还没有切换到 iOS 8 风格的方向方法。

最佳答案

结果我只是忘记在我的自定义关闭动画中设置呈现 View Controller View 的最后一帧。无论出于何种原因,这在 iOS 7 中都无关紧要。但在 iOS 8 中它确实如此。

关于iOS 8 : How to implement a rotating view controller on top of a portrait-only app?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25911763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com