RunLoop
文章平均质量分 89
chenqing_512
这个作者很懒,什么都没留下…
展开
-
iOS开发中 NSRunloop 与NSTimer的问题
我们在使用NSTimer的时候,可能会接触到runloop的概念,下面是一个简单的例子: 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 // Do any additional setup after loading the view, typically from a nib. 5 NSTimer原创 2016-03-12 10:01:42 · 276 阅读 · 0 评论 -
iOS NSTimer 子线程 创建与取消
1.子线程中NSTimer的开启 首先在.m文件中声明两个属性一个是子线程 一个是子线程中的NSTimer。 @property (nonatomic, strong) NSThread *thread1; @property (nonatomic, strong) NSTimer *threadTimer; 然后用GCD在全局全队中创建一个子线程并创建NSTimer。原创 2017-03-15 10:32:05 · 2756 阅读 · 0 评论