Ios Parse Login
- by user3806600
I am programming an IOS app that will use parse to login a user. Using storyboard I have the login button connected to another view controller with the push segue. Whether the username and password are correct the button selection always goes to the new view controller. I might be doing this all wrong. Any help is appreciated. Here is my code:
- (IBAction)signIn:(id)sender {
[PFUser logInWithUsernameInBackground:self.emailField.text password:self.passwordField.text block:^(PFUser *user, NSError *error) {
if (!error) {
[self performSegueWithIdentifier:@"signIn" sender:nil];
} else {
// The login failed. Check error to see why.
}
}];
}