延迟操作的几种方法

延迟操作的几种方法:

// NSTimer 创建定时器,repeats为NO 
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;                                                                                                

// NSObject 
- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay;                                                                                                                         

  // 模拟发送网络请求 
  void dispatch_after(dispatch_time_t when, dispatch_queue_t queue, dispatch_block_t block);   

你可能感兴趣的:(延迟操作的几种方法)