swift - Add add an object to a PFUser -


i try add object pfuser using following code:

@ibaction func buttonpressed(sender: anyobject) {      var user = pfuser.currentuser()     user.addobject("test", forkey: "surname")} 

but unfortunately no value on parse dashboard. don't understand why

did save?

var user = pfuser.currentuser() user.addobject("test", forkey: "surname")} user.saveinbackground() 

also couple notes. use let here user variable shouldn't change pointer, , subscript syntax more readable (my opinion) :)

let user = pfuser.currentuser() user["test"] = "surname" user.saveinbackground() 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -