ios - How can I create an array of PFObjects in a relation? -


i have relation has several pfobjects. want query relation , put of objects array. code not seem trick, however, hoping help.

code:

 var requestsquery = pfquery(classname: "requests")     requestsquery.wherekey("requested", equalto: pfuser.currentuser()!)     requestsquery.findobjectsinbackgroundwithblock {         (objects: [anyobject]?, error: nserror?) -> void in         if error == nil {             if let objects = objects as? [pfobject] {                 object in objects {                     usernames.append(object["requesterusername"] as! string)                     receivedoffers.append(object["cardsoffered"] as! [anyobject]) //error here: not cast value of type 'pfrelation' (0x13c3c8) 'nsarray' (0x38a26ab8).                      receivedrequests.append(object["cardsrequested"] as! [anyobject])                 }             }         } else {             println(error)         }         self.tableview.reloaddata()     } 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -