Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let highScore = UserDefaults.standard.object(forKey: "highscore")
- if highScore == nil{
- highscoreLabel.text = "HighScore : 0"
- }
- if let newScore = highScore as? Int{
- highscoreLabel.text = "HighScore : \(newScore)"
- }
Add Comment
Please, Sign In to add comment