title: iPhone: IBAction Causes “Unrecognized Selector Sent to Instance” Error
body: <p>I am developing an iphone application where you log in  a server and after you get validation my app moves you to another viewcontroller where you can use a button to send your gps location. For some reason when I press a button in my next viewcontroller I get this error : </p>
  
  <pre><code>Administrator[3148:c07] -[UIViewController SendGPS:]: unrecognized selector sent to instance 0x88b58d0
  2013-01-08 16:01:21.662 Administrator[3148:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController SendGPS:]: unrecognized selector sent to instance 0x88b58d0'
  </code></pre>
  
  <p>If I apply my gps code-buttons in a single viewcontroller it turns out to work fine but when I use my app with the two viewcontrollers when the first one redirects you to the second one (if only you log in to the server) I get this mistake.I move to the second viewcontroller through a condition where I check the response from the server. This is the code which i use to change viewcontrollers :</p>
  
  <pre><code>NSString *compare = [NSString stringWithFormat:@"true"];
  
      if ( [compare isEqualToString:string])  {
  
          UIViewController* FourthViewController = [[UIViewController alloc] initWithNibName:@"FourthViewController" bundle:[NSBundle mainBundle]];
          [self.view addSubview:FourthViewController.view];   }
      else
          NSLog(@"validation not complete");
  </code></pre>
  
  <p>and this is my button where i use an NSTimer:</p>
  
  <pre><code>-(IBAction)SendGPS:(id)sender
   {
       Timer= [NSTimer scheduledTimerWithTimeInterval:30.0 target:self  selector:@selector(requestIt) userInfo:nil repeats:YES];
   }
  </code></pre>
  
  <p>Any thoughts? thanks in advance!</p>