Touch events with Magic Mouse and iPhone Simulator

白昼怎懂夜的黑 提交于 2019-12-08 14:39:39

问题


I observe that with the iMac magic mouse, while using the iPhone simulator, if:

a) the active view has an object in the center of the iPhone screen which is capable of generating touch events, and b) the iMac operator accidentally or otherwise drags their finger(s) across the magic mouse surface in a way which would normally be used for scrolling, that

the object in the center generates (bogus) mouse down and drag events.

If there is no such object in the center of the screen, there is no issue.

Is there a way to programmatically or otherwise disable this feature?


回答1:


This is actually an issue with all Mac input devices with scroll functionality. If you do a two-fingered scroll up and down on a Macbook touch pad the same thing happens.

I believe this is more or less "intended", though it appears the touch up event is lost - so sometimes the interface gets stuck after a scroll gesture. I don't know of a way to programmatically disable this feature, unfortunately :-/




回答2:


Gesture-based scrolling the iOS simulator was disabled sometime around iOS 4 or the iPad, I believe. It would have conflicted with the giant, scrolling window of the iOS simulator running on smaller screens.



来源:https://stackoverflow.com/questions/2087797/touch-events-with-magic-mouse-and-iphone-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!