爱程序网

解决定时器在主线程不工作的问题

来源: 阅读:

 

NSTimer *timer = [NSTimer timerWithTimeInterval:2 target:self selector:@selector(someAction) userInfo:nil repeats:YES];

[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];

关于爱程序网 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助