1

I am using Parse.com as the backend for developing an iOS application (using Swift).

I currently have a PFQueryTableViewController displaying a list of rows from my Parse table "Sports".

I would like to, however, have the Parse-returned query-based cells in a section, and then have a section above this section with 3 more 'static'-type of cells.

The question is very similar to this one: Mix of static and dynamic table view cells iOS

BUT I am just unsure of how to do this with a PFQueryTableViewController...

Any help?

Community
  • 1
  • 1
Max
  • 1,974
  • 2
  • 16
  • 24
  • possible duplicate of [iOS - Static cells at top of PFQueryTable (Swift + Parse.com)](http://stackoverflow.com/questions/29767414/ios-static-cells-at-top-of-pfquerytable-swift-parse-com) – Suma May 20 '15 at 10:13

1 Answers1

0

So for anyone trying to do this, I found a BRILLIANT solution! Best part about it? ZERO CODE required!

I stumbled upon this other question in StackOverflow (UITableView Mix of Static and Dynamic Cells?) and found that the bottom answer of using a Container View at the top of the UITableViewController works the same for PFQueryTableViewController!

This web page gives further detail on how to do this step-by-step:

http://www.mikebobiney.com/2014/09/28/static-table-view-containers/

Community
  • 1
  • 1
Max
  • 1,974
  • 2
  • 16
  • 24
  • How did you manage to get multiple sections with only using PFQueryTabkeView? In the documentation it is described to only work with 1 section – Daniel Storch Apr 28 '15 at 22:57
  • So as described above, I had a TableViewController which was set to type of PFQueryTableView, then I dragged in a Container View and placed it above the TableView and inside that container view I inserted another TableView, so it's actually two table views, not a PFQueryTableView with multiple sections. Check out that link to the mikebobiney.com website for a set by step! – Max Apr 28 '15 at 23:53