iPad仅景观应用程序无法响应屏幕底部附近的触摸 [英] iPad landscape-only app not responding to touches near the bottom of the screen

查看:61
本文介绍了iPad仅景观应用程序无法响应屏幕底部附近的触摸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名经验丰富的开发人员,但对iOS来说相对较新。

I’m an experienced developer, but relatively new to iOS.

我在iPad应用程序遇到一些问题,我的视图没有响应按钮接触屏幕的底部三分之一。触摸其他按钮工作正常,所以我知道我的视图在加载时正确连接(我在IB中创建它们。)我在模拟器和设备上都得到了相同的行为。

I’m having some trouble with an iPad App, where my views are not responding to button touches in the bottom third of the screen. Touches on other buttons are working fine, so I know my views are getting hooked up properly when they’re loaded (I’ve created them in IB.) I get the same behavior on both the simulator and the device.

这是一个仅面向横向的App,我正在使用[NSBundle LoadNibNamed:]加载视图。这是应用程序中唯一的非常重要的部分,我想我已经跳过了所有适当的环节:

This is a landscape-orientation-only App, and I’m loading views using [NSBundle LoadNibNamed:]. This was the only non-trivial portion of the App, and I think I’ve jumped through all the appropriate hoops:


  • 添加了初始界面定向行到我的.plist

  • 在IB中以横向方向设计我的视图

  • 将shouldAutoRotateToInterfaceOrientation添加到我的顶级视图中,只返回YES为景观方向

横向可能没有关联,但我想我应该提一下,因为这是我发现的唯一一点难以建立,我从董事会看到其他人也发现了这个问题..

The landscape orientation may not be related, but I thought I should mention it, since it was the only thing I found a little wonky to build, and I see from the boards that other people have found this problematic as well..

有没有人有任何想法?

谢谢。

推荐答案

事实证明我的视图边界设置为全屏,但框架不是。通过明确设置框架,我能够实现这一点。

It turns out my view's bounds were set to the full screen, but the frame was not. By explicitly setting the frame, I was able to get this working.

这篇关于iPad仅景观应用程序无法响应屏幕底部附近的触摸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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