asynchronous call on uisearchbar on iphone
I need to set an asynchronous call for research on uisearchbar on Tablevie开发者_运维技巧w on remote server? I follow this tutorial to implement the searchbar on tableview but in this tutorial the list of element is static, while in my case I need to search on remote server.
Can you help?
You could use the delegate method
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
To send your request and make it auto complete, but i would use the
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
And in this method make a post or get request to your webservice.
Use ASIHTTPRequest for it or RestKit. I think you know how to do that?
精彩评论