我試圖在我的項目中實現一個搜索欄。當我按下鍵盤按鈕時,SearchBar不起作用
我已經創建了搜索欄的出口,已經設置了委託,但是當我按下任何鍵盤按鍵,從這個按鈕的值不會出現在UISearchBar
任何人能告訴我爲什麼嗎?
- (void)searchBarSearchButtonClicked:(UISearchBar *)aSearchBar {
// When the search button is tapped, add the search term to recents and conduct the search.
NSString *searchString = [aSearchBar text];
NSLog(searchString);
}
您是否實施了UISearchBarDelegate協議? – LuisEspinoza
是的@界面Tela1ViewController:UIViewController { –
Ladessa
問題是,當我數字,值不會出現在酒吧......是因爲我什麼也沒有... – Ladessa