xcode React Native:ipad 2 模拟上不需要的黑色边框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30269014/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
React Native: Unwanted Black border on ipad 2 simulation
提问by Jeroen Keppens
I am testing a new (simple) reactive native app, choosing ipad 2 as target in the simulator.
我正在测试一个新的(简单的)反应式原生应用程序,在模拟器中选择 ipad 2 作为目标。
The loading screen shows full screen, but the first application screen (by react native) shows a big black border around the content. I created a completely new project, but it has the same border.
加载屏幕显示全屏,但第一个应用程序屏幕(通过 react native)在内容周围显示一个大的黑色边框。我创建了一个全新的项目,但它具有相同的边框。
Is this a known issue? Do I need to add something to prevent this border from happening?
这是一个已知的问题?我需要添加一些东西来防止这种边界发生吗?
EDIT: I have an impression the application is built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. Probably this is causing it. So probably the first question is: how do I configure xcode that it is actually an ipad app?
编辑:我的印象是该应用程序是作为 iphone 应用程序构建的,但部署/显示到 ipad。我看到 1x / 2x 按钮。这可能是导致它的原因。所以第一个问题可能是:我如何配置 xcode 它实际上是一个 ipad 应用程序?
Thanks in advance!
提前致谢!
Jeroen
杰伦
采纳答案by Jeroen Keppens
The application was being built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. This was causing it. So: how do I configure xcode that it is actually an ipad app? See url below:
该应用程序正在构建为 iphone 应用程序,但部署/显示到 ipad。我看到 1x / 2x 按钮。这是造成的。那么:如何配置 xcode 使其实际上是一个 ipad 应用程序?见下面的网址:
回答by AshMan
Go to Build SettingsType Targeted Device Familyin search bar Select 1,2
转到搜索栏中的构建设置类型目标设备系列选择1,2
Run the project it should resolve your issue.
运行项目,它应该可以解决您的问题。
回答by Luat Vu Dinh
Now with newer version of XCode. Build Settings-> Targeted Device Family-> Select Universal.
现在使用较新版本的 XCode。构建设置->目标设备系列-> 选择Universal。
回答by geckob
I had this issues and solved it with this way,
我遇到了这个问题并用这种方式解决了它,
- Go to XCode, and General tab
In App Icons and Launch Image sections,
2.1. Click the dropdown Launch Image Source, and a pop up will come out, click Migrate
2.2. Click the dropdown Launch Screen File, and select the very first one
- Go to Build Settings Type Targeted Device Family in search bar Select 1,2
- 转到 XCode 和常规选项卡
在应用程序图标和启动图像部分,
2.1. 点击下拉Launch Image Source,会弹出一个弹框,点击Migrate
2.2. 单击下拉启动屏幕文件,然后选择第一个
- 转到搜索栏中的构建设置类型目标设备系列选择 1,2
I had this issues after updating assets for AppIcons and SplashScreen
我在更新 AppIcons 和 SplashScreen 的资产后遇到了这个问题
Hope it helps!
希望能帮助到你!