Created
January 13, 2016 03:27
-
-
Save makthrow/b647b4c367e111a76f8c 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: UIPageViewController, UIPageViewControllerDataSource, 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 = LoginViewController() | |
/// TODO: THIS IS NOT WORKING. LOGIN BUTTON NOT SHOWING, POSSIBLE BUG | |
loginViewController.fields = [PFLogInFields.Facebook] | |
loginViewController.delegate = self | |
loginViewController.emailAsUsername = false | |
loginViewController.facebookPermissions = ["public_profile", "email", "user_friends", "user_education_history", "user_birthday"] | |
loginViewController.signUpController?.delegate = self | |
self.presentViewController(loginViewController, animated: false, completion: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment