title: iOS segue between view controllers with navigation controllers
body: <p>I'm trying to pass a value using a storyboard segue. My storyboard goes Navigation Controller -> View Controller -> View Controller. </p>
  
  <p>I'm sure that everything else is set up correctly. I don't have any errors before testing on the simulator but am then presented with:</p>
  
  <blockquote>
    <p>[RunViewController2 topViewController]: unrecognized selector sent to instance 0x109d6a0b0
    2014-03-06 22:54:31.261 RunPal[22381:70b] <em>*</em> Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RunViewController2 topViewController]: unrecognized selector sent to instance 0x109d6a0b0'</p>
  </blockquote>
  
  <p>The code I am using in my first view controller is:</p>
  
  <pre><code>-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
     if([segue.identifier isEqualToString:@"passSegmentedValue"]){
  
        UINavigationController *nav = [segue destinationViewController];
         RunViewController2 *runVC2 = (RunViewController2 *)nav.topViewController;
  
         run2VC.weekIdentifier = ((UISegmentedControl*) sender).selectedSegmentIndex;
     }
  }
  </code></pre>