最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

Swift

[已解决]swift中创建不在main主线程的定时器

[已解决]swift中创建不在main主线程的定时器

crifan 8年前 (2016-05-02) 2666浏览 0评论

swift中,之前定期去做事情,用的是NSTimer,定时器,但是NSTimer是必须在主线程中实现 -》占用主线程的资源和时间 -》现在想要去实现不在main主线程的,定期去做事情的功能 swift periodic timer Using an ...

66 queries in 0.174 seconds, using 21.99MB memory