[英]How can I create a countdown timer that stops at zero on iOS?
The app description would be something like this: 应用说明将如下所示:
There are: 有:
When you click on start button, the timer goes from 3 seconds to 0 seconds, when it reaches 0, it stops, the click here button gets enabled and the mainTimer gets active, it goes from 60 seconds to 0 seconds. 当您单击开始按钮时,计时器从3秒变为0秒,到0时,计时器停止,单击此处按钮被启用,mainTimer变为活动状态,从60秒变为0秒。 Finally, when mainTimer reaches 0, the start button gets disabled again, the mainTimer stops, and an alert shows up saying: time's up!
最后,当mainTimer达到0时,开始按钮再次被禁用,mainTimer停止,并显示一条警告说:时间到了!
When the alert disappears everything gets the same state as in the beginning by clicking the reset button, and you are able to repeat the process. 警报消失后,通过单击重置按钮,一切都将与开始时的状态相同,并且您可以重复此过程。
My main problems are stoping the timers on 0, becoming enabled and disabled the click here button and to make the reset button putting everything as they were in the beginning. 我的主要问题是将计时器停止为0,启用和禁用“单击此处”按钮,并使“重置”按钮像开始时一样放置所有内容。
Thanks a lot!! 非常感谢!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.