Post

Replies

Boosts

Views

Activity

Reply to Keyboard shortcuts iPad cannot be used until screen is pressed.
would you try this modified code and see if this work without needing " press" anywhere on the screen (void)viewDidLoad { [super viewDidLoad]; // Create and add the key command UIKeyCommand* commandA = [UIKeyCommand keyCommandWithInput:@"a" modifierFlags:UIKeyModifierCommand action:@selector(handleCommand:)]; [self addKeyCommand:commandA]; // Make the view controller the first responder [self becomeFirstResponder]; } (BOOL)canBecomeFirstResponder { return YES; } (void)handleCommand:(UIKeyCommand *)keyCommand { // Hang up call [self btnIncomingAnswerPressed:NULL]; }
May ’24