How can I programmatically pause an NSTimer?

前端 未结 15 1788
梦毁少年i
梦毁少年i 2020-11-27 13:06

I\'m using an NSTimer to do some rendering in an OpenGL based iPhone app. I have a modal dialog box that pops up and requests user input. While the user is providing input

15条回答
  •  臣服心动
    2020-11-27 13:20

    Old question, but I just wrote a lightweight utility class to accomplish exactly what OP is looking for.

    https://github.com/codeslaw/CSPausibleTimer

    Supports repeating timers as well. Hope it comes in handy!

提交回复
热议问题