How to use RKTableController

319 views
Skip to first unread message

Derek

unread,
Jun 4, 2012, 12:27:07 AM6/4/12
to res...@googlegroups.com
I've spent about two hours now trying to figure out how to use RKTableController. What limited examples I've been able to find are incomplete and appear old and I cannot find any doco that give anything like a complete working example.

The controller does not inherit from UITableViewController which means it appear that I have to create it in the viewDidLoad of the UITableViewController I am using and then hook it as the dataSource and delegate whist leaving the original in place as well.  

Can anyone point me at some doco that shows how to use this controller because nothing I've read so far works or explains it?

Aditya Matharu

unread,
Jun 4, 2012, 12:29:01 PM6/4/12
to res...@googlegroups.com
Look at an example called rkgithub

That's the example that helped me understand how to do it.

Sent from my iPhone

Gregory Combs

unread,
Jun 4, 2012, 12:38:41 PM6/4/12
to res...@googlegroups.com
RKTableController not a UITableView or a UITableViewController.  It doesn't replace UITableViewController or UITableView, it just makes using them easier.  Think of it as a helper class, similar to NSFetchedResultsController.  You'll create your own UIViewController or UITableViewController as usual, but you'll also create an instance of RKTableController or RKFetchedResultsTableController to help manage the content.  Adi is correct, the RKGitHub example (found at https://github.com/RestKit/RKGitHub) is a good place to look for more info.  Also, for more detailed examples and use cases, you can look in RestKit's Tests/Applications/UI directory.

Greg
Reply all
Reply to author
Forward
0 new messages