我有一个UISearchBar
。只要用户点击搜索,我就想让键盘消失......我尝试了resignFirstResponder
,但这并没有奏效。任何帮助,将不胜感激隐藏键盘iphone sdk?
- (void)viewDidLoad {
[super viewDidLoad];
self.title = NSLocalizedString(@"Songs", @"Search for songs");
NSMutableArray *array = [[NSArray alloc]initWithObjects: @"Book_1", @"Book 2", @"Book _ 4", nil];
self.booksArray = array;
[array release];
search.delegate=self;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
感谢 TC
是它的工作图莎尔工作? – Ravin 2011-04-15 04:39:33
我有点尴尬地说,但它不工作的原因,我已经尝试了一切,我可以......我确信我没有发布搜索任何地方,并确保searchBar是第一反应[搜索isFirstResponder]; – 2011-04-15 17:39:14