开发者

How to implement type ahead functionality for UIsearchbar in ipad

I have to implement 开发者_高级运维the type ahead functionality for a search bar in ipad. whether such functionality is by default provided by any search bar delegate or how to implement it??


As I know this functionality is not provided by default, and you should do it by yourself. If you use tableView to display search results you should override searchBar:textDidChange: method of UISearchBar delegate. Something like this:

- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
    [self setSearchString:searchText];
    [self.searchResultsTable reloadData];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜