parse.com - Swift Parse progressBlock: extra argument in call -
the error says: argument 'progressblock' in call. what's wrong?
pin.saveinbackgroundwithblock({(success, error) -> void in if success == false { ... } else { ... } }, progressblock: { (amountdone: cint) -> void in var percent = float(amountdone) elf.progressindicatorview.progress = cgfloat(percent)/100 self.progressindicatorview.reveal() })
try:
pin.saveinbackgroundwithblock({ (succeeded: bool, error: nserror?) -> void in // handle success or failure here ... if succeeded { println("save successful") } else { println("save unsuccessful: \(error?.userinfo)") } }, progressblock: { (amountdone: int32) -> void in var percent = float(amountdone) self.progressindicatorview.progress = cgfloat(percent)/100 self.progressindicatorview.reveal() })
Comments
Post a Comment