mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Made the search bar delegate OK, and hide/show the cancel button on demand
This commit is contained in:
parent
3256ee4388
commit
a5584c2794
2 changed files with 11 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ typedef enum _ContactSelectionMode {
|
|||
|
||||
@end
|
||||
|
||||
@interface ContactsViewController : UIViewController<UICompositeViewDelegate,ABPeoplePickerNavigationControllerDelegate> {
|
||||
@interface ContactsViewController : UIViewController<UICompositeViewDelegate,ABPeoplePickerNavigationControllerDelegate,UISearchBarDelegate> {
|
||||
BOOL use_systemView;
|
||||
}
|
||||
|
||||
|
|
@ -94,5 +94,4 @@ typedef enum _ContactSelectionMode {
|
|||
- (IBAction)onAddContactClick:(id)event;
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
|
||||
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -348,6 +348,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
return false;
|
||||
}
|
||||
|
||||
#pragma mark - searchBar delegate
|
||||
|
||||
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
|
||||
// set searchbar text in uppercase here
|
||||
// searchBar.text = [searchText uppercaseString];
|
||||
|
|
@ -356,6 +358,14 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[tableController loadData];
|
||||
}
|
||||
|
||||
- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar {
|
||||
[searchBar setShowsCancelButton:FALSE animated:TRUE];
|
||||
}
|
||||
|
||||
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar {
|
||||
[searchBar setShowsCancelButton:TRUE animated:TRUE];
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
[self setToolBar:nil];
|
||||
[super viewDidUnload];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue