【问题标题】:How do I activate double tapping, pressing and holding keys in my iOS 8 custom keyboard?如何在我的 iOS 8 自定义键盘中激活双击、按住键?
【发布时间】:2023-04-01 06:32:02
【问题描述】:

如何激活双击 shift 键以激活大写字母并按住 del 键以不断删除我的 iOS 8 自定义键盘中的文本?

【问题讨论】:

    标签: ios swift xcode6 custom-keyboard


    【解决方案1】:

    对于双击,使用轻击手势识别器并设置tap.numberOfTapsRequired = 2。或者直接覆盖UIView中的touchesEnded,在touch.tapCount == 2的时候做点什么。

    对于按住,请使用NSTimer 来检测这一点。

    【讨论】:

      猜你喜欢
      • 2014-10-27
      • 2014-08-11
      • 2011-09-17
      • 2014-12-23
      • 1970-01-01
      • 2021-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多