title: Move to Destination Controller if data is validated
body: <p>Sorry if this question is asked before . I want my loginSegue (push) to open destination controller if login credentials are valid.</p>
  
  <p>My First Controller and next controller are connected by push segue (login segue)</p>
  
  <p>First Controller has login button and on its press event i am calling performSegueWithIdentifier</p>
  
  <p>I have done this so for</p>
  
  <pre><code>- (IBAction)loginMe:(id)sender { 
      [self performSegueWithIdentifier:@"loginSegue" sender:self];
  }
  
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      if ([[segue identifier] isEqualToString:@"loginSegue"])
      {
          if ([[nameTextField text] isEqualToString: @"admin"] &amp;&amp; [[passwdTextField text] isEqualToString:@"1234"]) {
  
             // destinationVC *vc= [[destinationVC alloc] init];
            // [segue destinationViewController] =vc;
             // destinationVC *vc = [segue destinationViewController];
  
           // how i set destinationVC as my destination controller ?
  
              NSLog(@"Credentials Match");
          }else{
              NSLog(@"Credentials dont Match");
          }
  
  
  }
  </code></pre>
  
  <p>}</p>