I want to place two Search display in one view controller(iPad). I drag two Search Display Controller in my view controller, however, only one search display works.
In the Connections Inspector, I find that one search display's outlet "searchDisplayController" is connected to "Search Display Controller", however the other one did not have this connection. I think that's why only one search display works.
My question is that: How can we use two search display in one view controller? I think my method: drag two Search Display Controller may be incorrect.
PS. I use the following code to determine which search display is focused.
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {
if (searchBar == self.customerTelSearchBar) {
telSearchEditing = YES;
addressSearchEditing = NO;
}else if(searchBar == self.addressSearchBar){
telSearchEditing = NO;
addressSearchEditing = YES;
}
return YES;
}