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:

https://www.parse.com/questions/how-to-use-findobjectsinbackgroundwithblock-properly-and-be-able-to-cache-the-result

long story short, seem not updating tableviews datasource before calling reloaddata. make array populates yout tableview contain objects findobjectsinbackgroundwithblockreturns, call reloaddata. best of luck , welcome so!


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -