how to show countdown on uilabel in iphone?

前端 未结 3 1610
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 01:44

i have a uilabel and a uislider on a view. i want to set label\'s time using slider.range of slider is 00:00:00 to 03:00:00. means 3 hours.and intervel on slider is 0.5 minutes.

3条回答
  •  无人共我
    2021-02-02 02:37

    you can keep your timer running when your application did enters background ,

    as @shawn craver told u you cant do this but you can do this when application enters into background ("not terminates") which is a different event applicationDidEnterBackground and with that you will need some multithreading GCD(grand central dispatch).

    plase refer this link

    set a timer in ios

提交回复
热议问题