javascript - Aktivera landskapsläge för iPad/surfplatta med react-native
Jag arbetar med ett krav där mobiltelefonen endast skulle stödja porträttläge medan surfplattan/iPad stöder både porträtt- och landskapsläge. Jag är inte säker på hur man uppnår kravet med react-native.
Svar #1
För iOS bör det räcka med att inkludera följande rader i ios/Info.plist-filen:
<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>
