iOS9 App顶部和底部都有黑条 [英] iOS9 App has black bars on top and bottom

查看:202
本文介绍了iOS9 App顶部和底部都有黑条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序不使用自动布局,它最初是为iPhone 4/4s设计的,自那时以来,UI几乎没有被修改过.布局非常小,因此尚未优先考虑切换其自动布局.

My app doesn't use auto layout, it was originally designed for an iPhone 4/4s and the UI has been mostly untouched since then. The layout is fairly minimal, so it hasnt been deemed a priority to switch it autolayout.

以前在iOS8上构建时,我的应用程序可以在iPhone 5和更高版本的iPhone 5上正常缩放,从而充满了整个屏幕.视图本身将填满整个屏幕,而图标将按比例缩放(以使它们不失真).但是,现在看来,使用iOS9 Beta,该应用程序在顶部和底部都出现黑条,并且基本上将其显示为缩放的iPhone 4应用程序,从而在顶部和底部出现黑条.

Previously building for iOS8 my app would scale properly on iPhone 5, and newer, filling the screen. The View itself would fill the entire screen, while the icons would scale proportionally (such that they were not distorted). however it seems now that using the iOS9 beta the app receives black bars at both top and bottom, and its basically displayed as a scaled iPhone 4 app, resulting in black bars on the top and bottom.

基本上,我希望它可以简单缩放以适合全屏显示,就像在iOS8中一样.任何人都可以向引起黑条的变化的地方照射一些光线吗?

Basically I want to it simply scale to fit the full screen, the same as it did in iOS8. Can anyone shine some light onto what has changed which has caused these black bars?

我应该添加一下,如果它使用xcode 7(ios9 xcode)构建并使用iOs8部署设备,它可以正常工作,则说明该问题正在部署到iOS9设备.

I should add, if it build using xcode 7 (ios9 xcode) and deploy a device with iOs8 it works fine, the issue is deploying to iOS9 devices.

该应用现在在iOS9上看起来类似,红色区域是可用的应用现在是空白,而以前是整个尺寸(请注意黑条).

The app looks like this on iOS9 now, the red area is the apps usable space now, whereas previously it was the entire size (note black bars).

推荐答案

@Fantina @Goles通过创建和添加分辨率为640x1136的Default-568h@2x.png文件,我能够临时修复此问题.然后,我更新了应用程序图标和启动图像"部分,如下所示:

@Fantina @Goles I was able to temporarily fix this by creating and adding a Default-568h@2x.png file with resolution 640x1136. I then updated the 'App Icons and Launch Images' Section to look like this:

我认为这不是一个长期解决方案,因为为了与iOS9和分屏应用兼容,Apple 需要情节提要或Xib文件.对于仅依靠程序化视图生成/布局的开发人员来说,这很困难.紧急.

I don't think this is a long term solution because in order to be compliant with iOS9 and split-screen apps, Apple is requiring storyboard or xib files. This makes it difficult for developers who rely solely on programatic view generation/layout. URGH.

这篇关于iOS9 App顶部和底部都有黑条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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