简体   繁体   English

ipad设备旋转时屏幕方向不正确

[英]ipad device screen orientation is not correctly when it is rotate

I'm working on this iPhone app, whose orientation works all fine except first screen. 我正在开发这个iPhone应用程序,除了第一个屏幕外,它的方向都很好。 The first screen also works fine if the device is in portrait orientation, but not for landscape orientation. 如果设备是纵向方向,则第一个屏幕也可以正常工作,但横向方向则不能。

Interestingly, if I rotate device at the first screen, it also adjust well. 有趣的是,如果我在第一个屏幕上旋转设备,它的调整效果也很好。

The problem looks to me is that the app always assumes the device is in portrait orientation, so the first screen is always shown in portrait orientation even if the device is in landscape orientation. 在我看来,问题在于应用程序始终假定设备为纵向,因此即使设备为横向,第一个屏幕也始终以纵向显示。

what can i do to solve this. 我该怎么办才能解决这个问题。

Thanks, Please help Me 谢谢,请帮助我

This nugget package may help you: 这个金块包可以帮助您:

https://www.nuget.org/packages/Xam.Plugins.Forms.DeviceOrientation/ https://www.nuget.org/packages/Xam.Plugins.Forms.DeviceOrientation/

So can check which orientation the device is. 因此可以检查设备的方向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在iPad2上更改设备方向时如何旋转视频源(在带有Qualcomm QCAR扩展的Unity中) - How to rotate video feed when changing device orientation on iPad2 (in Unity with Qualcomm QCAR extension) 旋转设备时如何固定相机方向 - How to fix camera orientation when rotate device 设备方向更改时 UIWindow 不旋转 - UIWindow does not rotate when device orientation change 更改设备方向后旋转uiscrollview - Rotate uiscrollview when changed device orientation swift-当设备旋转到横向(iPhone / iPad)时,如何使UIView变为全屏? - swift - How to have the UIView turn into full-screen when device rotate to landscape (iPhone/iPad)? iPhone / iPad:何时在设备旋转时更改背景 - iPhone/iPad: When to change background on rotate of device 即使装置的人像方向锁定处于开启状态,也强制旋转iOS - Force Rotate iOS Even When Device's Portrait Orientation Lock is ON 设备方向快速变化时如何旋转按钮? - How to rotate button when device orientation changes in swift? 当iPhone / iPad上的设备方向发生变化时,如何处理Swift中的弹出式窗口 - How to handle popover in Swift when the device orientation is changing on iPhone/iPad 当iPhone / iPad的设备方向改变时,如何处理UI组件? - How to handle UI components when device orientation for iPhone/iPad changes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM