mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
1
This commit is contained in:
parent
9512009150
commit
02aca405c6
2 changed files with 7 additions and 10 deletions
|
|
@ -813,17 +813,13 @@ void assistant_activate_phone_number_link(LinphoneAccountCreator *creator, Linph
|
|||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||
UIAssistantTextField *atf = (UIAssistantTextField *)textField;
|
||||
[textField resignFirstResponder];
|
||||
if (textField.returnKeyType == UIReturnKeyNext) {
|
||||
// text fields must be ordored by increasing tag value
|
||||
NSInteger tag = textField.tag + 1;
|
||||
while (tag < ViewElement_NextButton) {
|
||||
UIView *v = [self.view viewWithTag:tag];
|
||||
if ([v isKindOfClass:UITextField.class]) {
|
||||
[v becomeFirstResponder];
|
||||
break;
|
||||
}
|
||||
tag++;
|
||||
if (atf.nextResponder) {
|
||||
[atf.nextResponder becomeFirstResponder];
|
||||
} else {
|
||||
[[self findButton:ViewElement_NextButton] sendActionsForControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
} else if (textField.returnKeyType == UIReturnKeyDone) {
|
||||
[[self findButton:ViewElement_NextButton] sendActionsForControlEvents:UIControlEventTouchUpInside];
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ typedef BOOL (^DisplayErrorPred)(NSString *inputEntry);
|
|||
|
||||
@interface UIAssistantTextField : UITextField <UITextFieldDelegate>
|
||||
|
||||
@property(nonatomic, strong) IBOutlet UILabel *errorLabel;
|
||||
@property(nonatomic, weak) IBOutlet UIView* nextResponder;
|
||||
@property(nonatomic, weak) IBOutlet UILabel *errorLabel;
|
||||
@property(nonatomic, readonly) DisplayErrorPred showErrorPredicate;
|
||||
|
||||
@property(nonatomic, strong) NSString *lastText;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue