I get the Error : Cannot convert value of type '([PFObject]?, NSError?) -> Void' to expected argument type '([PFObject]?, Error?) -> Void?
The Code that is causing this error is found Below.
findUser.findObjectsInBackgroundWithBlock {
(objects:[PFObject]?, error:NSError?) -> Void in
if error == nil{
let user:PFUser = (objects as NSArray).lastObject as PFUser
cell.usernameLabel.text = user.username
UIView.animateWithDuration(0.5, animations: {
cell.typeOfPartyLabel.alpha = 1
cell.timeOfPartyLabel.alpha = 1
cell.usernameLabel.alpha = 1
})
}
}
return cell
}
I have been stuck with this error for the past few days and I can't seem to locate a working solution on I found was to switch anyObject with PFObject which I did but I was getting the same error. I'm trying to query the userName and display it in a UITableView Cell.
Thank you