iphone UISearchBar Done button always enabled
问题 I have a UIViewController with a UISearchBar. I have replaced the Search Button by a Done button. However, when one taps on the searchbar, the Done button is initially disabled. This occurs until one enters any character. What I want to do is to have this Done button always enabled, such that if i tap on it i can inmediately dismiss the keyboard. Any help? it would be highly appreciated. I have on my UIViewController -(BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar { return YES; }