mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 09:09:21 +00:00
Hide keyboard when the address textfield is empty
This commit is contained in:
parent
43f381b90a
commit
76a10e988d
1 changed files with 4 additions and 1 deletions
|
|
@ -369,12 +369,15 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
_addressField.text = @"";
|
||||
}
|
||||
_addContactButton.enabled = _backspaceButton.enabled = ([[_addressField text] length] > 0);
|
||||
if ([_addressField.text length] == 0) {
|
||||
[self.view endEditing:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onBackspaceClick:(id)sender {
|
||||
if ([_addressField.text length] > 0) {
|
||||
[_addressField setText:[_addressField.text substringToIndex:[_addressField.text length] - 1]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onBackspaceLongClick:(id)sender {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue