I am trying to pull data from a database to display on profile for score count and basically trying to set the label's text in Xcode. What is the best way to do this since what I am doing is throwing errors. I am trying to see what I did wrong. Thanks
I did
let user = PFUser.current!
if let score = user["score"] as? Int {
scoreLabel.text = score
} else {
scoreLabel.text = user.score
}