What is the best way to get data from Parse in a TableView, be able to create different sections and only store the 30 newest objects locally?
My Applikation has an PFObject Challenge
, the Challenge can be in the state "Accepted" or "Not Accepted". These are also my two Sections
in the TableView
. When Accepting a Challenge, it should "Pop" down to the Accepted Challenge Section
. This is done with a Boolean
.
I would like to use PFQueryTableViewController
if its possible since it implements some useful features, but i found out that it only supports TableViews
with 1 section by default.
Right now im considering to load the 30 newest PFObject
of the Challenge class
and sort them into a Dictionary
with 2 Arrays
"Accepted" and "Not Accepted", using a standard UITableViewController. The loading would be done in the "ViewDidLoad" Method.
Is this the right way doing this?
Also i would like to use the pin
feature of Parse and save the Data locally, so the User can still use the App when there is no internet connection. How do i implement that only the 30 newest objects are saved?