Default-568h@2x.png是不够的;无法点击屏幕的下半部分 [英] Default-568h@2x.png is not enough; can't tap bottom part of screen

查看:1382
本文介绍了Default-568h@2x.png是不够的;无法点击屏幕的下半部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

iphone 5模拟器 - 无法点击屏幕底部?

我在项目中添加了Default-568h@2x.png,导致信箱区域消失。但是,对于这个项目,我发现这个不足:我无法点击屏幕底部的任何像素,全屏幕动画会使这个区域变黑。

I have added a Default-568h@2x.png to my project, causing the letterbox areas to disappear. However, for this one project I am finding this insufficient: I can not tap any of the pixels on the bottom part of the screen, and full screen animations black out this area.

信箱区域已消失,屏幕已按预期扩展:

The letter box area has disappeared and the screen has expanded as expected:

我发现无法点击前960像素下的所有内容。此外,当动画正在进行中时,我在这960像素下看到一个坚实的黑条,如下所示:

I'm finding that everything under the first 960 pixels can't be tapped. Further, when animations are in progress I see a solid black bar under those 960 pixels, like this:

但是,当动画结束时,黑条会再次消失。但该区域仍无法点击。

However, when the animation ends the black bar disappears again. But that area is still not clickable.

此项目早于故事板,我无法将其升级为使用此版本的故事板。

This project predates storyboards, and I'm unable to upgrade it to use storyboards for this release.

有没有人知道什么是错的?

Does anyone know what's wrong?

推荐答案

当UIWindow具有旧的3.5英寸尺寸时会发生这种情况。 (这也会让UIActionSheets显示在屏幕下方)。

This happens when the UIWindow has the old 3.5 inch dimensions. (It also will make UIActionSheets show up above the bottom of the screen).

我仍然不确定发生了什么,但似乎特别是如果UIWindow在xib中。

I'm still not sure what's going on, but it seems to happen especially if the UIWindow is in a xib.

我们采取的修复步骤:


  1. 获取从xib中删除UIWindow,如果它存在。

  2. 添加到-application:didFinishLaunchingWithOptions:

  1. Get rid of the UIWindow from the xib, if it exists.
  2. Add to -application:didFinishLaunchingWithOptions:

self。 window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

或者,您可以设置xib到4英寸屏幕中UIWindow的模拟指标大小。这似乎也有效,即使在3.5英寸的屏幕上也是如此。

Alternately, you might set the Simulated Metrics size of the UIWindow in the xib to 4-inch screen. That seems to work too, even on a 3.5 inch screen.

这篇关于Default-568h@2x.png是不够的;无法点击屏幕的下半部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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