Customizing PFLogInViewController

53 views Asked by At

When using PFLogInViewController I would like to have a "Sign up" button in case a user comes and has no account yet. But even though I have set up PFSignUpFieldsSignUpButton in the line

[myLogInViewController setFields:PFLogInFieldsUsernameAndPassword|
    PFLogInFieldsDismissButton|PFSignUpFieldsSignUpButton];

It only makes a "Log In" button appear and no "Sign up" button.

What do I need to do?

Here the relevant sequence of code:

// CustomLogInViewController is a subclass of PFLogInViewController.
CustomLogInViewController *myLogInViewController = [[CustomLogInViewController alloc] init];
[myLogInViewController setFields:PFLogInFieldsUsernameAndPassword
 | PFLogInFieldsDismissButton|PFSignUpFieldsSignUpButton];
1

There are 1 answers

0
Michel On BEST ANSWER

In case someone has a similar problem at some point. This is what I had done wrong. Instead of:

[myLogInViewController setFields:PFLogInFieldsUsernameAndPassword|
    PFLogInFieldsDismissButton|PFSignUpFieldsSignUpButton];

It should be:

[myLogInViewController setFields:PFLogInFieldsUsernameAndPassword|
 PFLogInFieldsDismissButton|PFLogInFieldsLogInButton|PFLogInFieldsSignUpButton];