解决定时器在主线程不工作的问题
发布日期:2021-05-09 04:04:12 浏览次数:16 分类:博客文章

本文共 190 字,大约阅读时间需要 1 分钟。

 

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

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

上一篇:UIPickerView的使用(一)
下一篇:iOS AutoLayout的用法

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2025年03月23日 09时37分05秒