#pragma mark 模拟器键盘事件
- (NSArray *)keyCommands
{
static NSArray *keyCommands;
#if TARGET_IPHONE_SIMULATOR
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
UIKeyCommand *composeCommand = [UIKeyCommand keyCommandWithInput:@"r"
modifierFlags:UIKeyModifierCommand
action:@selector(composeShortcut:)];
keyCommands = @[composeCommand];
});
#endif
return keyCommands;
}
- (void)composeShortcut:(UIKeyCommand *)command
{
[self reloadAction];
}
网友评论