Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PFUser *currentUser = [PFUser currentUser];
- if (currentUser) {
- // do stuff with the user
- } else {
- // show the signup or login screen
- }
- [PFUser logInWithUsernameInBackground:@"myname" password:@"mypass" block:(PFUser user, NSError error) {
- if (user) {
- // Do stuff after successful login.
- } else {
- // The login failed. Check error to see why.
- }
- }];
- // Sent to the delegate when a PFUser is logged in.
- - (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user {
- [self dismissViewControllerAnimated:YES completion:NULL];
- [self startMyApplication]; //example
Add Comment
Please, Sign In to add comment