我正在尝试在我的项目中实现搜索栏。
我已经创建了 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);
}