HI I want to detect tab button pressed in iPad app from wireless keyboard(external keyboard) So I make next textfield first responder. I am doing the following code, But it not working on tab key. It working fine incase return key.
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
if(textField == textName){
if ([string isEqualToString:@"\t"]) {
[textName resignFirstResponder];
[textRno becomeFirstResponder];
}
}
return YES;
}
Is there any other way for it.
Seems you want to switch to the next input view (e.g. text field) on tab stroke. The system does this automatically!
You can control the "tab-order" using the view tags and the code in this answer: https://stackoverflow.com/a/1351090/550177
Also look at these related questions:
TextField delegate never get called for a tab button on the keyboard..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With