ios - 如何激活 iOS 8 自定义键盘中的双击、按住按键?

标签 ios swift xcode6 custom-keyboard

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

最佳答案

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

对于按住,使用 NSTimer 来检测。

关于ios - 如何激活 iOS 8 自定义键盘中的双击、按住按键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28129292/

相关文章:

ios - 如何使用适用于 iOS 应用程序的 Swift 将拟我表情贴纸添加到我的表情符号键盘

ios - 开发过程中是否需要 dSYM 文件?

ios - 关于 Swift 中 iPhone 闹钟应用程序中日期重复功能的问题

Swift 4 和 Firebase 附加所有带有用户名和个人资料图像错误的帖子

ios - 如何阻止 mapView 中 showsUserLocation 的交互?

ios - 来自 xib 键值编码崩溃的 UITableHeaderFooterView

ios - SKStore​Review​Controller,如何正确使用?

swift - 来自 Codility GenomicRangeQuery in Swift 4.2 的这个前缀 Sum Coding Challenge 的解释

xcode 6 swift 慢速打字和自动完成

swift - Xcode 6 : Unable to resize textview height without changing the width