如何仅在iPad上的横向显示摄像头覆盖图
问题描述:
我正在为iPad的钛合金应用程序工作,并且我支持所有屏幕方向,但是我只在横向左侧显示相机上的自定义覆盖图。我试着设置orientationModes:[Ti.UI.LANDSCAPE_LEFT]但没有效果。每当我改变方向时,覆盖层都在旋转。 我的问题是我如何锁定横向模式下的窗口方向?如何仅在iPad上的横向显示摄像头覆盖图
谢谢。
答
您是否尝试在tiapp.xml文件中添加以下内容?
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
希望这会有所帮助。
感谢您的回复,但在tiapp.xml中我启用了所有方向,并且我只想将相机覆盖图显示在横向上。 UISupportedInterfaceOrientations〜ipad的 UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown –