【发布时间】:2020-10-19 03:55:28
【问题描述】:
我正在研究移动设备仅支持纵向模式而平板电脑/iPad 同时支持纵向和横向模式的要求,我不确定如何使用 react-native 来实现该要求
【问题讨论】:
标签: javascript android ios react-native mobile
我正在研究移动设备仅支持纵向模式而平板电脑/iPad 同时支持纵向和横向模式的要求,我不确定如何使用 react-native 来实现该要求
【问题讨论】:
标签: javascript android ios react-native mobile
对于 iOS,在 ios/Info.plist 文件中包含以下行应该可以做到这一点:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
【讨论】: