UIMainMenuSystem.shared // 自定义菜单 menuSystem.setBuildConfiguration(config) { builder in // UIKeyCommand let refreshCommand = UIKeyCommand(input: "R", modifierFlags: [.command], action: #selector
绕过了这个系统bug,完美解决了这个问题,主要流程如下: 图6 我们给自己的APP自定了快捷键 Ctrl + V,用于触发用户进行粘贴操作 : - (NSArray<UIKeyCommand { NSMutableArray *commands = [NSMutableArray arrayWithArray:a]; [commands addObject:[UIKeyCommand discoverabilityTitle:@""]]; return commands; } return @[ [UIKeyCommand findFirstResponder:(id)sender { currentFirstResponder = self;}@end//触发获取剪切板的操作如下:- (void)posteboardCommand:(UIKeyCommand
UIKeyModifierCommand action: ^(__unused UIKeyCommand