Skip to content

Fix Swift sample for SignUpViewController fields #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions _includes/ios/user-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,14 @@ signUpController.fields = (PFSignUpFieldsUsernameAndPassword
| PFSignUpFieldsDismissButton);
</code></pre>
<pre><code class="swift">
signUpController.fields = (PFSignUpFields.UsernameAndPassword
| PFSignUpFields.SignUpButton
| PFSignUpFields.Email
| PFSignUpFields.Additional
| PFSignUpFields.DismissButton)
signUpController.fields = [PFSignUpFields.UsernameAndPassword,
PFSignUpFields.SignUpButton,
PFSignUpFields.Email,
PFSignUpFields.Additional,
PFSignUpFields.DismissButton]
</code></pre>

Essentially, you use the bitwise or operator (`|`) to chain up all the options you want to include in the sign up screen, and assign the value to `fields`. Similarly, you can turn off any field by omitting it in the assignment to fields.
Essentially, you create an array of all the options you want to include in the sign up screen, and assign the value to `fields`. Similarly, you can turn off any field by omitting it in the assignment to fields.

### Responding to Sign Up Success, Failure or Cancellation

Expand Down