■
ども
ダメリです。
前回の復習。
⑦ストップ機能/スタート機能
if timerRunning = true{
timer.invalidate()
timerRunning = false
}else{
timer = NStimer.scheduledTimerWithTimeInterval(1, target: self, selector: Selector("update"), userInfo: nil, repeats: true)
timerRunning = true’’’
}
ここのtimerRunning = falseを入力し忘れる。
timer = NStimerの=を.で書いた
⑧スタートボタンのプログラム update
func(){
countNum = countNum - 1
labelUpdate()
if countNum == 0{
timer.invalidate()
timerRunning = false
imgView.image = img02
}
}
if countNum == 0{
timer.invalidate()
timerRunning = false
imgView.image = img02
ここが丸漏れ