iphone 5模拟器 - 无法点击屏幕底部? [英] iphone 5 simulator - Cannot click on bottom of screen?

查看:110
本文介绍了iphone 5模拟器 - 无法点击屏幕底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新应用程序以添加对iPhone 5的支持。根据我看到的其他主题,我添加了 Default-568h@2x.png 按照规定,我已向应用程序添加了一些适当大小的新背景图像。问题是我的应用程序的底部似乎没有响应触摸(我有一个页面控件和一个信息按钮)。

I'm trying to update an app to add support for the iPhone 5. Based on other threads I have seen, I have added the Default-568h@2x.png as specified and I have added some new background images to the app that are sized appropriately. The problem is that the bottom portion of my app does not seem to be responding to touch (I have a page control and an info button).

此外,切换屏幕时(使用以下代码):

Additionally, when switching screens (using the following code):

[self presentModalViewController:tableNavController animated:YES];

屏幕底部黑屏。这个黑色部分基本上就是我无法触摸的地方。此问题的屏幕截图如下:

The bottom of the screen blacks out. This black section is basically exactly where I am unable to touch. Screenshot of this issue is below:

有关为何会发生这种情况的任何想法?为什么我无法访问这个底部?请注意,如果我运行常规iPhone 4S或iPad模拟器,则不会发生这种情况。我可以访问屏幕的整个部分。

Any ideas on why this would be happening? Why I cannot access this bottom section? Note if I run the regular iPhone 4S or iPad simulator this does not happen. I can access the entire section of the screen.

编辑:这可能是模拟器问题吗?我还没有物理iPhone 5,所以我无法在真实设备上测试它。

Could it be a simulator problem? I do not have a physical iPhone 5 yet, so I am unable to test it on a real device.

Edit2:我尝试了启用和禁用视图和应用程序主窗口上的自动布局。如果我将以下日志语句添加到viewDidLoad:

I have tried both enabling and disabling Auto-Layout on both the views and the applications main window. If I add the following log statement to viewDidLoad:

NSLog(@"Window is: %0.0fx%0.0f", window.frame.size.width, window.frame.size.height);
NSLog(@"View is: %0.0fx%0.0f", viewController.view.frame.size.width, viewController.view.frame.size.height);

我收到窗口是:320x480。查看是:320x548 。所以看起来它可能是我的窗口的问题。我将继续调查。

I receive Window is: 320x480. View is: 320x548. So it looks like it may be a problem with my window. I will continue to investigate.

推荐答案

想出来。虽然视图是,但主窗口没有调整大小。我从我的xib中删除了窗口,创建了一个新窗口并重新链接它。这解决了这个问题。

Figured it out. The main window was not getting resized although the view was. I deleted the window from my xib, created a new one and re-linked it. That solved the issue.

这篇关于iphone 5模拟器 - 无法点击屏幕底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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