gpt4 book ai didi

ios - 更改从shouldAutorotateToInterfaceOrientation返回: at runTime

转载 作者:行者123 更新时间:2023-11-29 05:02:39 25 4
gpt4 key购买 nike

我正在使用 shouldAutorotateToInterfaceOrientation: 对所有方向响应"is"。

在运行时,在少数情况下,我必须仅在纵向中将返回更改为 YES。

但是,如果我更改此返回类型,并且我的设备没有物理转动,我的界面方向不会改变。如何强制 uiView 检查 shouldAutorotateToInterfaceOrientation: 并在没有 UIdevice 旋转通知的情况下旋转 View 。

非常感谢。

最佳答案

从IOS 5开始静态方法:
[UIViewController attemptsRotationToDeviceOrientation];

关于ios - 更改从shouldAutorotateToInterfaceOrientation返回: at runTime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6518961/

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