react-native - 闪屏后 iPad 屏幕旋转 180 度
问题描述
应用程序在 iPad 上加载后颠倒,手动 180 度旋转后,应用程序按预期工作
在真实 iPad 设备上的行为相同,适用于 Android
方向:在 app.json 配置中锁定为“横向”
我的 App.js 文件:
import React from 'react';
import { View, Text } from 'react-native';
const App = () => {
return (
<View style={{ flex: 1, backgroundColor: 'grey', justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ position: 'absolute', fontSize: 30, top: 0 }}>TOP</Text>
<Text style={{ position: 'absolute', fontSize: 30, left: 0 }}>LEFT</Text>
<Text style={{ position: 'absolute', fontSize: 30, right: 0 }}>RIGHT</Text>
<Text style={{ position: 'absolute', fontSize: 30, bottom: 0 }}>BOTTOM</Text>
</View>
);
};
export default App;
博览会 SDK:“^37.0.0”
我的 app.json 文件:
{
"expo": {
"packagerOpts": {
"config": "metro.config.js",
"sourceExts": [
"js",
"jsx",
"ts",
"tsx",
"svg"
]
},
"name": "My Test App",
"slug": "my-test-app",
"privacy": "public",
"platforms": [
"ios"
],
"version": "1.2.6",
"orientation": "landscape",
"splash": {
"image": "./assets/splash2.png",
"resizeMode": "contain",
"backgroundColor": "#113F67"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "ru.my.testapp",
"buildNumber": "1.2.6",
"supportsTablet": true,
"isTabletOnly": true,
"requireFullScreen": true,
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "location"
},
"config": {
"googleMapsApiKey": "api-key"
}
},
"description": ""
}
}
解决方案
推荐阅读
- r - R中的y轴标签以及如何将x轴更改为R中的特定增量
- javascript - 反应:当模式打开时防止滚动
- validation - 交叉检查 Google 表单和 Google 表格
- python - 与 Octave 的 pinv(A) 等效的 Numpy 代码(伪逆)
- javascript - 带ID的Goutte登录
- php - 不同的 PHPUnit 版本
- java - Url在java中编码字符串的一部分
- r - 如何使用“for 循环”写入多个 .csv 文件名?
- spring-boot - Spring Boot - 使用 Spock 在没有弹簧上下文的情况下进行测试
- .net-core - 使用 useSwaggerUI 扩展方法只注册一次,调用两次