ios - Set Object to Array using Parse Swift -


day, guys. need set append new object array, placed in parse.com. this:

    var myarray:nsarray = []     myarray.append("newobject")     pfobject.setobject(myarray, forkey: "arrayparse") 

my goal - saved username array , them, array in parse. lot helping

i think can use fonction :

func saveusernametoparse(){     var usernames = ["jon", "joe", "jim"]     var parseclass = pfobject(classname: "_user")      username in usernames {         parseclass["username"] = username         parseclass.saveinbackgroundwithblock{(success: bool, error: nserror!) -> void in             if success == false {                 println(error)             } else {                 println("posted succesfully")             }         }     } } 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -