ios - UITableViewController with Section and Parse as BackEnd server -
i don't find , update answers loading data parse uitableviewcontroller sections.
i know using pfquerytableviewcontroller possible 1 section.
i have class recipes following columns in parse: section; name; calories
hence database looks morning; eggs; 120 morning, bacon; 250 lunch; meat; 340 ....
i compute function query data parse this:
func querydata(){ var query = pfquery(classname: self.recipesclass string) //query.cachepolicy = .cacheelsenetwork query.orderbydescending("createdat") query.findobjectsinbackgroundwithblock { (objects: [anyobject]?, error: nserror?) -> void in if error == nil { // results found, looking first on // network , on disk. // found objects if let objects = objects as? [pfobject] { object in objects { self.tablesections.addobject(object) } } else { // network inaccessible , have no cached data // query. } } }
where tablesections nsmutablearray.
from here, i'm bit lost on how proceed achieve required results.
please help,
thank in advance
you want create different sections based on 'section' property of each returned object. bit tricky new uitableview
, can accomplished in around hour sensible tableviews (http://sensiblecocoa.com/).
sensible tableviews let take array of objects , separate several sections. interfaces directly parse.com if desire. use in of apps simple, clean approach tables , cloud data.
start online guide here: http://sensiblecocoa.com/usermanual/latest/
you can skip right parse.com integration here: http://sensiblecocoa.com/usermanual/latest/#exploringparsecombinding
Comments
Post a Comment