query.findObjectsInBackgroundWithBlock { (objects:[AnyObject]?, error:NSError?) -> Void in
if error == nil {
if let objects = objects as? [PFObject] {
for object in objects {
print("woot")
}
}
} else {
// Log details of the failure
print("Error: \(error) \(error!.userInfo)")
}
dispatch_async(dispatch_get_main_queue()){
//reload the table view
query.cachePolicy = PFCachePolicy.NetworkElseCache
}
}
For some reason, the line:
query.findObjectsInBackgroundWithBlock { (objects:[AnyObject]?, error:NSError?) -> Void in
is giving me the error:
Cannot convert value of type '([AnyObject]?, NSError?) -> void to expected argument type 'PFQueryArrayResultBlock?'
I have no idea how to fix the error.
Thanks!