ios - Swift/Parse: findObjects()! changing other PFObject instances values? -
i've created 2 queries in viewdidload():
offlinequery = pfquery("dados").fromlocaldatastore() onlinequery = pfquery("dados") when app launches first time, local data store populated online data provided findobject()! method of onlinequery:
let objects = onlinequery.findobjects()! as! [pfobject] pfobject.pinall(objects) when user clicks on refresh button perform search @ at local data store using findobject()! offlinequery:
var objectsoff = offlinequery.findobjects()! as! [pfobject] then search online data:
let objectson = onlinequery.findobjects()! as! [pfobject] the problem starts when try compare both arrays after ordering them, , result shows equal. decided print content of both, , equal.
to solve problem had store values separated variables , regrouped them array of string. however, code became big.
what happened here?
Comments
Post a Comment