Category: iOS
104 posts
NSTimer两种初始化方式的区别
NSTimer有两种常用的创建方式 ``` // 第一种 timer = [NSTimer timerWithTimeInterval:1 target:self selector:@selector(timerSelector:)...
Read More →GCD 创建定时器
使用NSTimer定义定时器需要将NSTimer对象添加到当前线程的RunLoop。否则在进行其他RunLoop切换时,会导致NSTimer受到影响,不能准确的进行调用。 而使用GCD创建定时器,更加精确,不需要使用RunLoop。...
Read More →iOS多线程应用
当前iOS的多线程方式分为4中 > - pthreads > - NSThread > - GCD > - NSOperation \& NSOperationQueue pthreads 定义...
Read More →