简体   繁体   English

"在 iOS 上:如何消除底部边缘屏幕上 800 毫秒的 MouseDown 延迟?"

[英]On iOS: How to remove MouseDown delay of 800 ms at bottom edge screen?

When I tap on a control near the bottom edge of the screen, the MouseDown event is fired with a delay of around 800 ms.当我点击屏幕底部边缘附近的控件时,会触发 MouseDown 事件,延迟时间约为 800 毫秒。 This makes my app feel very sluggish.这使我的应用程序感觉非常缓慢。 I discovered however, that if I tap while moving my finger horizontally (swipe), the MouseDown event is fired immediately.然而,我发现,如果我在水平移动手指(滑动)的同时点击,MouseDown 事件会立即触发。

I know that iOS has a default delay of 300 ms in its Gesture Recognizer to detect if the user wanted to swipe up the iOS control panel (the one where you can turn on\/off the airplane mode, wifi, bluetooth, etc).我知道 iOS 在其手势识别器中默认延迟 300 毫秒,以检测用户是否想要向上滑动 iOS 控制面板(您可以在其中打开\/关闭飞行模式、wifi、蓝牙等)。 Somehow Delphi turned 300 ms into 800 ms...不知何故,Delphi 将 300 毫秒变成了 800 毫秒……

The native solution to remove the 300 ms delay seems to be to use UIScreenEdgePanGestureRecognizer<\/code> , which I did not find anywhere in the Delphi FMX sourcecode, and I am not sure it will solve it since Delphi somehow increased the delay, which suggests something else is going on.消除 300 毫秒延迟的本机解决方案似乎是使用UIScreenEdgePanGestureRecognizer<\/code> ,我在 Delphi FMX 源代码的任何地方都没有找到它,我不确定它会解决它,因为 Delphi 以某种方式增加了延迟,这表明还有其他事情正在发生在。

How do I remove the 800 ms delay for the MouseDown?如何消除 MouseDown 的 800 毫秒延迟?

PS. PS。 I use Delphi 10 upd 1, X code 7.2 on OS X Yosemite and iOS 9.2.1我在 OS X Yosemite 和 iOS 9.2.1 上使用 Delphi 10 upd 1、X code 7.2

"

It is not yet supported by Delphi (as of Delphi 11), but luckily David Nottage has fixed this in his KastriFree library. Delphi 还不支持它(从 Delphi 11 开始),但幸运的是 David Nottage 在他的KastriFree库中修复了这个问题。 The direct link to the demo app that implements the solution is here: https://github.com/DelphiWorlds/KastriFree/tree/master/Demos/iOSGestureLag实现该解决方案的演示应用程序的直接链接在这里: https ://github.com/DelphiWorlds/KastriFree/tree/master/Demos/iOSGestureLag

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM