我有一個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