Sian 发表于 2015-8-25 10:47:11

ios 4寸屏只显示3.5寸大小问题

1、现象描述:

xcode6 新建项目,删除storyboard,删除lunch xib,代码创建windows和rootViewcontrol,能正常运行,但5s等4寸机型屏幕上部和下部显示为黑色背景,只有中间一块为可视区域。当然,状态栏也一同下移。

2、原因分析:

项目中没有4寸屏的启动图片,因此系统默认只适配3.5英寸屏

3、解决办法:

        Taking advantage of the full 4" screen in your apps seems to be as simple as adding a new Default image named [email protected] with size 640 x 1136. Xcode 4.5 will actually offer to do this for you automatically by adding a black image of the proper size and name to your project.
       
        意思是说在项目中添加[email protected]@2x.png 这三张图片,其中前两张为3.5尺寸,后面[email protected]为4尺寸分辨率为640 x 1136

        如果是xcode6创建的项目,注意要在General---App Icons and Launch Images 的Launch Images Source 选择图片目录,如下图所示:

页: [1]
查看完整版本: ios 4寸屏只显示3.5寸大小问题