xcode 如何在 iOS 模拟器中设置默认方向
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8753542/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set the default orientation in iOS Simulator
提问by ananfang
I always test the iOS app on iOS Simulator in portrait orientation. But I did't know what I change, it currently run in landscape orientation in default...@@"
我总是在 iOS 模拟器上以纵向测试 iOS 应用程序。但我不知道我改变了什么,它目前在默认情况下以横向运行......@@”
How to set the default orientation back to portrait mode?
如何将默认方向设置回纵向模式?
UpdatedChange the "Supported Device Orientations" to Portrait only. And run the simulator, it will show in portrait mode at start. And then change the "Supported Device Orientations" to what you want, it will start in portrait.
更新将“支持的设备方向”更改为仅纵向。并运行模拟器,它会在启动时以纵向模式显示。然后将“支持的设备方向”更改为您想要的,它将以纵向开始。
回答by Devan Somaia
I just had the same problem, I fixed it by going to the app's .plist file, and changing the 'supported interface orientations' options.
我刚刚遇到了同样的问题,我通过转到应用程序的 .plist 文件并更改“支持的界面方向”选项来修复它。
It is an array of possible orientations, and I'm pretty sure that it is in priority order, so make sure 'portrait (bottom home button)' is the first one.
它是一系列可能的方向,我很确定它是按优先顺序排列的,因此请确保“纵向(底部主页按钮)”是第一个。
It worked for me, hope it helps you.
它对我有用,希望对你有帮助。
回答by Jason Coco
Rotate it. In the Simulator, use CMD+LeftArrow or CMD+RightArrow to rotate, or use the menu option Hardware->Rotate Left or Hardware->Rotate Right.
旋转它。在模拟器中,使用 CMD+LeftArrow 或 CMD+RightArrow 进行旋转,或者使用菜单选项 Hardware->Rotate Left 或 Hardware->Rotate Right。