gpt4 book ai didi

ios - Xcode 4.3 纵向运行应用程序

转载 作者:行者123 更新时间:2023-11-28 22:52:21 25 4
gpt4 key购买 nike

您好,我正在创建一个 iOS 应用程序,我希望它始终以纵向模式运行,即使我向左/向右转动它我也希望它保持不变,这里有一些与纵向相关的所有设置的图像。

enter image description here

enter image description here

enter image description here

这就是我设置的所有内容,所以我的问题是,即使我在它运行时倾斜它,它也会以纵向打开,但如果我向左转,它会旋转到横向,我如何保持纵向.

提前致谢,期待您的光临。

最佳答案

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{

return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

使用该方法只支持竖屏模式

关于ios - Xcode 4.3 纵向运行应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11630312/

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