iPhone触控表面是否大于屏幕?(Is the iPhone touch surface larger than the screen?)

编程入门 行业动态 更新时间:2024-10-25 04:24:28
iPhone触控表面是否大于屏幕?(Is the iPhone touch surface larger than the screen?)

[我有一个奇怪的iPhone bug,只在iPhone 5S上测试过。]

我的应用程序有两个窗格,每个窗格宽度为320像素。 当右窗格完全可见(并且左窗格完全隐藏)时,我有时可以点击窗格上的按钮。 此按钮触摸左窗格的右边框。 很难触发bug,触发器表面似乎位于手机的边缘。

如果iPhone 5S触控表面不大于320px屏幕,则不应该这样做。

iPhone 5S触控表面是否比320px屏幕大? 即,iPhone 5S屏幕边缘是否有一些额外的触摸灵敏度像素?

[I have a weird iPhone bug, only tested on an iPhone 5S.]

My app has two panes, each of width 320px. When the right pane is fully visible (and the left pane fully hidden), I can sometimes tap a button on the left pane. This button touches the left pane's right border. It is hard to trigger the bug, the trigger surface seems to be on the edge of the phone.

If the iPhone 5S touch surface is no larger than the 320px screen, this should not be possible.

Is the iPhone 5S touch surface larger than the 320px screen? I.e., do the iPhone 5S screen edges have a few extra pixels of touch sensitivity?

最满意答案

这是您的界面的问题,而不是硬件。 按钮的可触摸边界区域可能大于按钮的明显可见绘图。 因此,它可能会从左侧无形地粘在您的屏幕上。 要确认这一点,请通过为按钮提供显示其实际尺寸的背景颜色,尝试使隐形可见。

哦,还有一件事。 您可能会将窗格放置一个像素。 这足以将按钮的一个像素宽度带到屏幕上 - 因此难以点亮它。

由于两个窗格永远不会同时可见,为什么不通过在窗格之间添加一些空间来避免整个问题呢?

It's a problem with your interface, not the hardware. The touchable bounds region of the button may be bigger than the apparent visible drawing of the button. Thus, it may be invisibly sticking into your screen from the left. To confirm this, try making the invisible visible, by giving the button a background color that shows its actual dimensions.

Oh, one more thing. You may be positioning your panes off by one pixel. That would be enough to bring one pixel width of the button onto the screen - and thus would make it, with difficulty, tappable.

Since both panes will never be visible simultaneously, why not avert this entire issue by adding some space between the panes?

更多推荐

本文发布于:2023-04-29 03:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334576.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表面   屏幕   触控   iPhone   screen

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!