Skip to content

Instantly share code, notes, and snippets.

@makthrow
Created January 13, 2016 03:27
Show Gist options
  • Save makthrow/b647b4c367e111a76f8c to your computer and use it in GitHub Desktop.
Save makthrow/b647b4c367e111a76f8c to your computer and use it in GitHub Desktop.
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