I am building a swift game and a need to set up a highscore , i have been trying to figure out how to do it for a while. So please can you tell me how to search this library to
var defaults=NSUserDefaults()
var highscore=defaults.integerForKey("highscore")
if(Score>highscore)
{
defaults.setInteger(Score, forKey: "highscore")
}
var highscoreshow=defaults.integerForKey("highscore")
lblHighScore.text="\(highscoreshow)"
println("hhScore reported: \(lblHighScore.text)")
lblPlayScore.text="\(Score)"
println("play reported: \(lblPlayScore.text)")