ios - 'PFUser' does not have a member named 'subscript' -
this question has answer here:
- pfuser not have member named subscript? 2 answers
i don't have enough reputation post images, i'm using parse signup , shows me 'pfuser' not have member named 'subscript' error
please check code below
var user = pfuser() user.username = usernametextfield.text user.email = emailtextfield.text user.password = passwordtextfield.text let imagedata = uiimagepngrepresentation(self.profileimage.image) let imagefile = pffile(name: "profilephoto.png", data: imagedata) user["photo"] = imagefile -> [error in line] user.signupinbackgroundwithblock { (succeeded, error) -> void in if error == nil { println("signup successful") } else { println("signup failed") } }
it means cannot access property image
subscript. instead of user["photo"]
try user.photo
Comments
Post a Comment