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

标签:非主线程

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

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

crifan 10年前 (2016-05-02) 3181浏览

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

63 queries in 0.221 seconds, using 18.89MB memory