@property (nonatomic, strong) NSTimer *timer;添加定时器self.timer = [NSTimer scheduledTimerWithTimeInterval:999.0 target:self selector:@selector(executeFun) userInfo:nil repeats:YES];//999.0代表要延时的时间,executeFund代表要999秒后需要执行的方法[[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];//将定时器加入到事件循环删除定时器[self.timer invalidate];self.timer = nil;