title: How to keep timer function running after seguing to a modal view
body: <p>Basically I would like my timer to continue running a CheckMessage function in ParentViewController while allowing UI interaction in a modal ChildViewController which is segued by the ParentViewController.</p>
  
  <p>I have tried using GCD (not good at it) but to no avail. Somehow when after the ChildViewController is pushed into view, the timer stops executing the said function.</p>
  
  <p>Please help! Thank you so much...</p>
  
  <p>Here is the code in ParentViewController:</p>
  
  <pre><code>NSTimer *timer_checkMessage;
  
  -(void)viewDidAppear
  {
      [timer_checkMessage invalidate];
  timer_checkMessage = nil;
  
  timer_checkMessage = [NSTimer scheduledTimerWithTimeInterval:1 target:self    
      selector:@selector(CheckMessage) userInfo:nil repeats:YES];
  
      [self performSegueWithIdentifier:@"ChildSegue" sender:self];
  NSLog(@"Seguing child view...");
  }
  
  -(void)CheckMessage
  {
      //check message
  }
  </code></pre>