gpt4 book ai didi

ios - 仅支持纵向

转载 作者:行者123 更新时间:2023-12-01 17:35:23 25 4
gpt4 key购买 nike

我只需要在我的应用程序中支持纵向。我该怎么做?我已尝试添加

<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
 -(BOOL)     shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return UIInterfaceOrientationPortrait;
}
但这无济于事 - View 无论如何都会旋转。
提前致谢!

最佳答案

-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation应该返回一个 BOOL,即 NO在你的情况下。

关于ios - 仅支持纵向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3846629/

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