ios - How to pass error param in SWIFT with saveInBackgroundWithTarget -


i have use

currentemployer.saveinbackgroundwithtarget(self, selector: "reloaddata") 

to reload tableview. call works, described in docs, can pass error parameter function listed in selector check whether failed. how can pass error parameter reloaddata function?

kind regards sebastian

it looks saveinbackgroundwithtarget:selector: deprecated, since it's no longer in the pfobject documentation. try saveinbackgroundwithblock: instead:

currentemployer.saveinbackgroundwithblock { succeeded, error in     if succeeded {         self.reloaddata()     } else {         // handle error. maybe this:         self.showalertwitherror(error)     } } 

Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

css - SVG using textPath a symbol not rendering in Firefox -

c - gcc compile error: unknown type name 'File' -