As-You-Type-Searching with Core Data / NSFetchedResultsController

Posted by Snej on Stack Overflow See other posts from Stack Overflow or by Snej
Published on 2010-05-12T17:22:41Z Indexed on 2010/05/12 23:54 UTC
Read the original article Hit count: 315

I implemented an as-you-type-searching (text search on single attribute) by fetching with performFetch: after each given character by the user. The performFetch: is running in a background thread to avoid keyboard freezes.

But while typing many useless fetches are started. A NSOperationQueue might be an option, but I wonder if there are other approaches for this quite usual search behavior.

What's best practice to notice when fetching is done and the table view is updated with the previous fetch to start a new fetch?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch