I have a UITableView with an attached UISearchBar. When the user taps the search key in the keyboard I want to send a request to a server to get some information. Everything works fine, but the resignFirstResponder doesn't close the keyboard until the request has been sent. This is what I have
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
[self.mySearchBar resignFirstResponder];
[self.brain searchInfo: mySearchBar.text];
[self.tableView reloadData];
}
I have also tried to use
[self.view endEditing:YES];
but without succes...