gpt4 book ai didi

iphone - 我的按钮在 iPhone(Retina 4 英寸)模拟器上检测不到触摸事件,但在 iPhone(Retina 3.5 英寸)模拟器上可以工作

转载 作者:IT王子 更新时间:2023-10-29 08:04:49 27 4
gpt4 key购买 nike

我正在使用模拟器为 iPhone 5 准备我的应用程序,我发现了一个奇怪的问题,在我的一个 View 中,我的几个按钮在 iPhone(Retina 4 英寸) 模拟器,但在 iPhone(Retina 3.5 英寸)模拟器中运行良好。这些按钮在被点击时根本不做任何事情。还有其他人遇到过这个问题吗?

我很难弄清楚从哪里开始这个。关于从哪里开始的任何建议?

非常感谢您的智慧!

最佳答案

您需要编辑 MainWindow.xib 并启用“启动时全屏”。更详细的解释参见苹果文档:

Important: When creating your window in Interface Builder, it is recommended that you enable the Full Screen at Launch option in the attributes inspector. If this option is not enabled and your window is smaller than the screen of the target device, touch events will not be received by some of your views. This is because windows (like all views) do not receive touch events outside of their bounds rectangle. Because views are not clipped to the window’s bounds by default, the views still appear visible but events do not reach them. Enabling the Full Screen at Launch option ensures that the window is sized appropriately for the current screen.

Complete document from Apple

关于iphone - 我的按钮在 iPhone(Retina 4 英寸)模拟器上检测不到触摸事件,但在 iPhone(Retina 3.5 英寸)模拟器上可以工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12501976/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com