Shortcuts at your fingertips.
iOS 9 works seamlessly with the Smart Keyboard,adding a variety of useful QuickType features to your iPad Pro. @H_403_6@
07001@H_403_6@
Time-saving Shortcuts @H_403_6@
Use keyboard shortcuts to perform even more commands on your iPad Pro—like switching between apps or bringing up search with your Smart Keyboard. And interact with your apps using their own built-in custom shortcuts. Just press and hold a key like Command,Option,or Control to see shortcuts in anyapp.@H_403_6@
解决方法
唯一添加的是discoverabilityTitle,它用于在任何运行iOS 9的iPad上显示可用的命令名称.您可以在任何提供键盘快捷键的屏幕(例如iOS主屏幕)上按住命令键,在模拟器中看到此菜单.@H_403_6@
@H_403_6@
有关于此的nice write up on NSHipster,其中包括这些iOS 9功能.@H_403_6@
基本上你需要做以下事情:@H_403_6@
>允许视图控制器成为第一响应者.>在视图控制器的keyCommands方法中返回一组UIKeyCommands.>处理发送到视图控制器的操作.@H_403_6@