ios - iOS 中的 React Native 60 及以上边距问题 - 忽略虚假层大小
问题描述
我在较旧的 react native 项目中使用了边距样式,这没有问题。现在我正在创建新的 RN 项目 - 0.60.5 版本。
return(
<ImageBackground
style={{ flex: 1, alignItems: "center", justifyContent: "center" }}
source={require('../images/bgImage.png')}
>
<View style={{backgroundColor:"white",height:"8%",
borderRadius:5,width:"70%",marginTop:10}}>
</View>
</ImageBackground>
)
在上面的代码中,添加marginTop
组件View
iOS 应用程序后挂起并将日志显示为
Ignoring bogus layer size (179769313), contentsScale 1.000000, backing store size
如果我删除marginTop
style ,那么 UI 将被渲染。
有没有人在 React Native iOS 中知道它?如何解决这个问题?
解决方案
我有同样的问题。将 Xcode 升级到 v11.2.1 修复了它。
推荐阅读
- javascript - 为什么 id 和 itemId 在此代码中的工作方式不同?
- java - 跨 JNi 传递字节缓冲区但无法看到 bytebuffer 元素
- regex - 用于检查没有“=”的纯字母字符串的正则表达式
- c++ - 对具有特定结构的数据包缓冲区进行排序
- python-3.x - 如何分别处理海龟的点击和海龟的点击?
- c++ - 带有条件语句错误的 constexpr,使用 Stroustrup 示例
- python - 尽管 JSON 正确,但奇怪的 json.decoder.JSONDecodeError
- r - Ape:: 共识树和边缘长度丢失,有解决方案吗?
- python-3.x - 为什么有必要澄清我的变量在这种情况下是全局的?
- delphi - 如何从字节数组复制双字大小数据并在 Delphi 中转换为双字类型值?