ios - How to retrieve user's friend list and show in TableView with swift -
i'm using parse , i'm able save user's friend user added in current user's object don't know how retrieve current user's friend list , show them in tableview how can list current user's object , display in tableview parse in swift. (my app doesn't have facebook @ all). appreciated.
thank you
edit: op posted code in comments, formatted question:
var query = pfuser.query(); var currentuser = pfquery(classname:"user"); currentuser.wherekey("currentuser", equalto: pfuser.currentuser()) currentuser.findobjectsinbackgroundwithblock { (objects:[anyobject]!, error:nserror!) -> void in if error == nil { self.tableview.reloaddata() }
i've managed save friend user added in pfrelation can't manage show user list in tableview.my tableview didn't show username of current user account
you may want check post on parse.com, explains how findobjectsinbackgroundwithblock:
works:
long story short, seem not updating tableviews datasource before calling reloaddata
. make array populates yout tableview contain objects findobjectsinbackgroundwithblock
returns, call reloaddata. best of luck , welcome so!
Comments
Post a Comment