forked from mirrors/linphone-iphone
Dismiss Keyboards when tapping out of them
This commit is contained in:
parent
e6c1496d3f
commit
6e38f85d68
3 changed files with 29 additions and 0 deletions
|
|
@ -39,6 +39,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if (IPAD) {
|
||||
_backButton.hidden = YES;
|
||||
}
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
|
||||
initWithTarget:self
|
||||
action:@selector(dismissKeyboards)];
|
||||
|
||||
[self.view addGestureRecognizer:tap];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
|
@ -51,4 +56,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
- (IBAction)onBackClick:(id)sender {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
}
|
||||
|
||||
- (void)dismissKeyboards {
|
||||
[self.tableController.searchBar resignFirstResponder];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -110,6 +110,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
/*if ([tableController totalNumberOfItems] == 0) {
|
||||
[self changeView:ContactsAll];
|
||||
}*/
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
|
||||
initWithTarget:self
|
||||
action:@selector(dismissKeyboards)];
|
||||
|
||||
[self.view addGestureRecognizer:tap];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
|
@ -220,6 +225,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[searchBar resignFirstResponder];
|
||||
}
|
||||
|
||||
- (void)dismissKeyboards {
|
||||
[self.searchBar resignFirstResponder];
|
||||
}
|
||||
|
||||
#pragma mark - searchBar delegate
|
||||
|
||||
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
|
||||
|
|
|
|||
|
|
@ -131,6 +131,12 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
UILongPressGestureRecognizer *oneLongGesture =
|
||||
[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onOneLongClick:)];
|
||||
[_oneButton addGestureRecognizer:oneLongGesture];
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
|
||||
initWithTarget:self
|
||||
action:@selector(dismissKeyboards)];
|
||||
|
||||
[self.view addGestureRecognizer:tap];
|
||||
|
||||
if (IPAD) {
|
||||
if (LinphoneManager.instance.frontCamId != nil) {
|
||||
|
|
@ -422,4 +428,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
linphone_core_stop_dtmf(LC);
|
||||
}
|
||||
|
||||
- (void)dismissKeyboards {
|
||||
[self.addressField resignFirstResponder];
|
||||
}
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue