**
创建一个定时器:
**
NSTimer *timer = [NSTimer timerWithTimeInterval:2.0 target:self selector:@selector(nextImage) userInfo:nil repeats:YES];
//将这个定时器以默认方式(NSDefaultRunLoopMode)添加到当前线程消息循环
NSRunLoop *runloop = [NSRunLoop currentRunLoop];
[runloop addTimer:timer forMode:NSDefaultRunLoopMode];
// 这种方法创建的定时器与上面的代码完全等价
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(n