UITableView with Core Data and fetchedResultsController - don't want to call it at start up

Posted by zebulon on Stack Overflow See other posts from Stack Overflow or by zebulon
Published on 2010-12-20T15:40:46Z Indexed on 2010/12/21 9:54 UTC
Read the original article Hit count: 279

Hi all,

I started with the Navigation-based application. I have a UITableView that shows the content fetched from CoreData - using the - (NSFetchedResultsController *)fetchedResultsController from the template.

The thing is that I don't want to fill the TableView with the results at the start-up, instead I want to fill the TableView with the results from a search. In my app I have an UITextField, where the user can type a string. And from that string, using predicate, I want to fill the UITableView with the results. In other words, at start-up, the UITableView should be empty and later filled with the search-results.

Does anyone have an idea on how to accomplish this?

Thanks in advance!

EDIT: Solved it by moving out if (![fetchedResultsController_ performFetch:&error]) { and calling it later. I feel a bit stupid ;)

© Stack Overflow or respective owner

Related posts about uitableview

Related posts about core-data