0
我的NSTimer正在工作,但只是倒计时秒?分钟显示为“00”,秒数倒数,分钟保持为零。 int countdownInt来自用户输入,我一直在测试45分钟倒计时器输入“45”。唯一发生的事情是秒数从“45”开始倒数? countdownInt,秒和分钟都在.h文件中声明为intNSTimer只能倒数秒?
感谢您的帮助!
countdownInt -=1;
seconds = countdownInt % 60;
minutes = (countdownInt/60) % 60;
countdownTimerLabel.text = [NSString stringWithFormat:@"%02d:%02d", minutes, seconds];
谢谢!这就是答案! – user1304216 2012-04-27 18:27:18