views:

32

answers:

1

I mean... could I also just create a plain old UIViewController and then set up a UITableView myself, plus an NSFetchedResultsController?

How much do UITableViewController and NSFetchedResultsController interact with eachother? As far as I see it, UITableViewController is NOT by default already adopting the NSFetchedResultsControllerDelegate protocol. It almost looks like if UITableViewController has been developed without knowing about NSFetchedResultsController. Probably they even did that before developing FRC. Anyways, just a raw guess because the UITableViewController lacks of mentioning FRC at all.

So the only thing I see in UITableViewController is that it is already the delegate for a UITableView by adopting the protocol, and it sets up the UITableView instance for me and assigns it internally to it's tableView property. Is that the whole magic of UITableViewController?

(note: the nsfetchedresultscontrolle tag is not a typo. SO has a limit for the num of chars...too bad for that missing r, that's why I avoided this tag in my other buch of questions like the plague)

+1  A: 

Yes, you can do that. Your view controller is not required to subclass UITableViewController. However, NSFetchedResultsController is designed to go with a table view. If your UI does not have a table view at all then a NSFetchedResultsController is probably the wrong answer.

Marcus S. Zarra