简体   繁体   中英

Parse & Swift : logInViewController.fields

I'm trying to customize the Parse Log In View Controller (adding or removing fields) in my new Swift Project.

First I tried to add this (as said in official parse tutorial) :

logInViewController.fields = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten

This was the error returned:

'PFLoginFields' is not convertible to 'Bool'

Next, I tried the solution mentioned here: Swift: Could not find an overload for '|' that accepts the supplied arguments

This solution returned the following error on Xcode 6 beta 4 :

'PFLoginFields' does not have a member named 'value'

Anyone have a solution working with this Xcode 6b4 ?

(sorry for my English, not my mother language)

Parse changed the names in their last update:

use

PFLogInFields.UsernameAndPassword 

instead of

PFLogInFieldsUsernameAndPassword

I also experienced some other problems after applying this change but give it a try and update us how it went!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM