定时器_随笔
程序员文章站
2022-04-19 19:29:42
...
NStimer
[NStimer timerWithTimeInteraval: target: [email protected]( ) userInfo: repeats: ];
NSRunLoop *runloop = [NSRunLoop currentRunLoop];
[runloop addTimer:timer forMode:NSDefaultRunLoopMode];
[NStimer scheduledTimerWithTimeInteralval: target: selector:@selector( ) userInfo: repeats: ];
//拖拽时候 销毁定时器
//松手时候 重新创建定时器
//线程问题 NSCommentModes解决 加入到NSRunLoop消息循环中、