Search code examples
iosuitableviewuiviewcontrollerparse-platformpfquery

How to make a PFQueryTableView work inside a UIViewController


I'm trying to figure out how to get the benefits of the PFQueryTableViewController to work inside of a a regular UIViewController that has a TableView embedded in it. Because apparently I can't load data from parse onto my TableView. It just pops up as a blank tableView with none of my information from Parse in it unless the code is ran on a UITableViewController, then it has no problems. But I'm trying to get my program to run on a Table View thats in a UIViewController. And whenever I change the @Interface from- @interface MainWall: UIViewController to @interface MainWall :PFQueryTableViewController, the app crashes.

So my question is, is there anyway around this? I read a little about subclass, subviews and Container View Controller but no one actually showed how to create them besides Parse's AnyWall code, which was extremely confusing.


Solution

  • You are correct in that you will have to use a container view controller. Here is a good link with a container view tutorial