Guest User

Untitled

a guest
Aug 8th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. iOS - Am I making a silly if statement error? I think i'm losing the plot
  2. - (IBAction)loginButton:(id)sender {
  3.  
  4.  
  5. NSString *username = usernameField.text;
  6. NSString *password = passwordField.text;
  7.  
  8. if(username == @"test")
  9. {
  10. [self performSegueWithIdentifier:@"loginSegue" sender:sender];
  11. }
  12. else{
  13. NSLog(@"NOT PERFORMING SEGUE! USERNAME: %@ -- PASSWORD: %@", username, password);
  14. }
  15.  
  16.  
  17. }
  18.  
  19. [username isEqualToString@"test"];
Add Comment
Please, Sign In to add comment