views:

32

answers:

1

Hello good morning,

I am looking for a way to implement a "live search" like the iPhone appsstore Application. Actually i have my search bar and a UItableview, what i am doing is when i type in "ABC" and click on the search button it does a search and in turn i have a XML from the server and i parse it and shows the results in the Uitableview. I know i can use Ontextchange and while i typ eit will search but its gonna take a load of time.

I have seen iphone appstore search .. while you type in it searches .. u type "A" it searches all apps beginning with an "A".

Any Help would be greatly appreciated :).

Regards,

Veer.

A: 

Take a look at ASIHTTPRequest library. It's very simple to use for HTTP asynchronous call.

Alternatively, if you just want to use API from Apple, you can use NSURLConnection, and these corresponding delegate methods:

  • (void)connection:(NSURLConnection *)theConnection didReceiveData:(NSData *)incrementalData;
  • (void)connectionDidFinishLoading:(NSURLConnection*)theConnection;
Nevin
Thanks nevin, that was helpful :)
Veer
Yes actually i had another question, supposed i typed a and doing the search in a background Thread and the user continues to type in .. is there any way to deal with this type of concurrency ? Thanks :)
Veer