4 英寸屏幕中 IOS 应用程序中的黑色空间 [英] black space in IOS app in 4inch Screen

查看:16
本文介绍了4 英寸屏幕中 IOS 应用程序中的黑色空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 4 英寸和 3.5 英寸视网膜创建一个适用于 IOS7 的应用程序,当我的目标版本是 IOS7 时,一切正常.但是当我将版本设置为 6.1 以下时,顶部和底部栏会有一个空白区域.当我在 IOS6.1 Simulator 4inch 中运行它时,我得到了这样的结果.我有适用于 IOS6.1 和更早版本的 Default-568h@2x.png .我正在使用 Xcode 5DP

I am creating an App for IOS7 for both retina 4inch and 3.5 inch, when my target version is IOS7 every thing wrks fine. But when i set the version below 6.1 then there is a white space at the top and bottom bar. when i run it in IOS6.1 Simulator 4inch i get something like this. I have the Default-568h@2x.png for IOS6.1 and prior also in place. I am using Xcode 5DP

当应用程序具有目标版本 7 时的屏幕截图

Screen shot when app has target version 7

任何帮助将不胜感激

推荐答案

要解决这个问题,您必须专门为 iOS 6 添加背景图片,请按照以下步骤使用新的 xCode 添加.

To solve this issue you have to specifically add background images for iOS 6, Follow following steps to add this using new xCode.

1) 从资产目录中添加新图像集并将其命名为默认"图像集

1) Add new image set from asset catalog and name it "Default" image set

2) 右键单击​​该资产目录图像.

2) Right click on that asset catalog image.

3) 从以下选项中选择 iPhone, Retina 4 - inch

3) Choose iPhone, Retina 4 - inch from options like following

4) 按分辨率顺序添加图片

4) Add images in sequence with resolutions

  1. 320 * 480

  1. 320 * 480

640 * 960

640 * 1136

5) 清理你的项目

6) 运行你的项目

这篇关于4 英寸屏幕中 IOS 应用程序中的黑色空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆