此上都是借鉴和总结的内容只做本人复习用。

1、PerformSelector:
[self performSelector:@selector(TestSelector:) withObject:nil afterDelay:1];
注:此方式要求必须在主线程中执行,否则无效。是一种非阻塞的执行方式,暂时未找到取消执行的方法。
2、NSTimer
[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(delayMethod) userInfo:nil repeats:NO];
注:此方式要求必须在主线程中执行,否则无效。是一种非阻塞的执行方式,可以通过NSTimer类的- (void)invalidate;取消执行。
3、NSThread
[NSThread sleepForTimeInterval:2];
注: 使线程沉睡2秒