0

How can I hide the keyboard only for specific UITextFields? I have a lot of UITextField in a View Controller, which has also a SearchbarDisplayController. I tried to use this but it blocks the UISearchbarDisplayController's job.

Thank you.

For more detail:

For example I have 3 UITextFields and a searchbar display controller. If there is only UITextFields , while tapping out ofthe keyboard, the keyboard successfully disappear. But when I touch the searchbar, you know the keyboard is open and I enter some text to searchbar. So it gives me some results in searchresultstable of the searchbar. But I can't select any row from searchresultstable. Because the disapper keyboard blocks it.

Community
  • 1
  • 1
user3065761
  • 65
  • 1
  • 10
  • please give more details. what you want is to remove the keyboard when the user taps out of the textfield, but only for certain textfields? – Andre Cytryn Dec 16 '13 at 22:12
  • Sorry for the late respond. I add more detail about my problem. – user3065761 Dec 17 '13 at 07:02
  • when you touch the searchbar, the keyboard don't have the search button? – Ilario Dec 17 '13 at 08:56
  • It searchs automatically with every word that I enter. I followed this tutorial for the searchbar.http://iosmadesimple.blogspot.com/2012/12/table-search-display-tutorial.html – user3065761 Dec 17 '13 at 08:59

1 Answers1

0

it seems to me that in this tutorial this method has not been implemented, try to add it

 -(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {

   [searchBar resignFirstResponder];
 }
Ilario
  • 5,979
  • 2
  • 32
  • 46