Swift getting image from Parse.com and setting image with it -


trying image parse , set uiimage keep getting error. running xcode 7 , swift 2.0

cannot invoke 'getdatainbackgroundwithblock' argument list of type '(imagedata:nsdata,error:nserror.type,()->())'

let query: pfquery = pfquery(classname: "items")     query.wherekey("itemowner", equalto: "shreddish")      // 3     query.findobjectsinbackgroundwithblock { (objects, error) -> void in         if error == nil {             print("successfully retrieved: \(objects)")             object in objects! {                 print(object)                 let imagefile: pffile = object["itemmainimage"] as! pffile                 var image = imagefile.getdata()                  imagefile.getdatainbackgroundwithblock(imagedata: nsdata, error: nserror) {                   }             }         } else {             print("error: \(error) \(error!.userinfo)")         }     } 

change

imagefile.getdatainbackgroundwithblock(imagedata: nsdata, error: nserror) {     ... } 

to

imagefile.getdatainbackgroundwithblock {     (imagedata: nsdata?, error: nserror?) -> void in     ... } 

Comments