React Native - iPhone X 上的奇数空格 [英] React Native - Odd spaces on iPhone X
问题描述
当我尝试将我的应用程序构建到运行 iPhone X 的模拟器时,屏幕顶部和底部有一个奇怪的空间,如图所示.应该是全屏的.知道我该如何解决这个问题吗?提前致谢.
When i try to build my app to simulator running iPhone X there's an odd spaces on top and bottom of the screen as shown in the image. It's supposed to be full screen. Any idea how i can fix this? Thanks in advance.
我正在运行 rn v0.47 和 xcode 9.
i am running rn v0.47 and xcode 9.
推荐答案
可能您将启动屏幕设置为图像,请尝试将 LaunchScreen
设置为故事板并确保具有 使用安全区域布局指南
就可以了.
Probably you are setting the launch screen as images, try by setting the LaunchScreen
as a storyboard and be sure to have the Use Safe Area Layout Guides
active on it.
如果您没有 LaunchScreen.storyboard
,您可以创建一个新的并设置它,或者创建一个新的空项目并获取现有的 LaunchScreen.storyboard
code> 并将其复制/粘贴到您当前的项目中.
If you don't have a LaunchScreen.storyboard
you can just create a new one an set it, or create a new empty project and just grab the existing LaunchScreen.storyboard
and copy/paste it to your current project.
这篇关于React Native - iPhone X 上的奇数空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!