Created
January 13, 2016 03:25
-
-
Save makthrow/5fe3c6ccef49430570d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController, PFLogInViewControllerDelegate, PFSignUpViewControllerDelegate{ | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
} | |
override func viewDidAppear(animated: Bool) { | |
super.viewDidAppear(animated) | |
if (PFUser.currentUser() == nil) { | |
let loginViewController = PFLogInViewController() | |
loginViewController.delegate = self | |
loginViewController.facebookPermissions = ["public_profile", "email", "user_friends", "user_education_history", "user_birthday"] | |
loginViewController.fields = [PFLogInFields.Facebook] | |
loginViewController.emailAsUsername = true | |
self.presentViewController(loginViewController, animated: false, completion: nil) | |
loginViewController.signUpController?.delegate = self | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment