如果我像这样启动 NSTimer:
@property (strong) NSTimer * messageTimer;
self.messageTimer = [NSTimer scheduledTimerWithTimeInterval:10.0
target:self
selector:@selector(checkForMessages)
userInfo:nil
repeats:YES];
当我切换到不同的视图控制器时它会继续运行吗?
直到我取消它:
[messageTimer invalidate]; self. messageTimer = nil;