简体   繁体   English

iOS应用程序上的自定义键盘快捷键

[英]Custom keyboard shortcuts on iOS apps

I realize that iOS has the ability to have keyboard shortcuts (eg: Command-C for Copy, Command-V for Paste, etc). 我意识到iOS可以使用键盘快捷键(例如:用于复制的Command-C,用于粘贴的Command-V等)。 But is there a way to make your own keyboard shortcuts? 但是有没有办法制作自己的键盘快捷键? Is there a way to implement them? 有没有办法实现它们? I would like to know so that I can add them to some of my note-taking apps in the near-future. 我想知道,以便我可以将它们添加到我不久的将来的一些笔记应用中。 Thanks! 谢谢! :) :)

You'll need to modify a UIMenuController if you want to have your implementation blend in with the apple UI (It's always best to comply with the HIG!). 如果要将实现与Apple UI混合在一起,则需要修改UIMenuController(始终最好遵循HIG!)。 Here's the class reference , and a nice tutorial . 这是课程参考和一个不错的教程

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

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