0
開始我有這樣的代碼:復位按鈕按下計時器和0
var timer = NSTimer.scheduledTimerWithTimeInterval(3, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
它3秒更新功能後運行。但我如何重置計時器? Evertytime用戶按下按鈕時,定時器必須重新設置並從0到3進行計數。我該如何解決這個問題?