I have created a timer function in swift SpriteKit and assigned it to a ScoreLabel. when the timer is active and updating itself, the undesired result is... 0:01 - 0:09 and then it is 0:010, I need to write some code to remove that second zero when the "second hand" changes from :09 to :10.
A little help would be great.
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
for touch: AnyObject in touches {
if ScoreLabel.text == "0"{
let actionrun = SKAction.runBlock({
self.score++
self.timesecond++
if self.timesecond == 60 {self.timesecond = 0}
self.ScoreLabel.text = "\(self.score/60):0\(self.timesecond)"
})
ScoreLabel.runAction(SKAction.repeatActionForever(SKAction.sequence([actionwait,actionrun])))
}