UISearchBarController Not Loading Cells

Discussion in 'iOS Programming' started by isthisonetaken, Feb 19, 2012.

  1. isthisonetaken, Feb 19, 2012
    Last edited by a moderator: Feb 20, 2012

    isthisonetaken macrumors regular

    Jun 29, 2006
    Hey All,

    so I have an app and one of the tabs shows the customers for the app. I'm using Core Data to store my data and using CoreDataTableViewController (that's a zipped folder with the code for CoreDataTableViewController inside) from the stanford courses to help me use a NSFetchedResultsController to manage the table.

    I'm using Xcode 4.2 and this is an iPad iOS 5 app. Everything is set up and working just fine in terms of adding/ modifying customers and having them show up in the table view fine.

    I should mention as well that I'm using a custom cell, so I can have images and multiple labels etc.

    I added a UISearchBarController in IB and added in the code to have a separate NSFetchedResultsController to be used for it. From putting in some NSLog calls I know I am setting that fetchedResultsController up properly, and it is getting filled properly, but the Search Table isn't being updated...

    I put an NSLog call in to tableView:cellForRowAtIndexPath: and I'm creating the proper customer and filling the cell in properly, it just isn't being shown on the search display table...

    Any ideas of what I'm doing wrong?

    I should point out as well that I have all the uitableviewdatasource methods checking which table view is calling the method and then using the proper fetchedresultscontroller.

    Also, I've noticed now to that if I type in some search query that shouldn't return anything, it does put "No Results" into the display. It just leaves the table blank when I type in some search query that should (and from my tests, does) return results.

Share This Page