When using the Parse BaaS with Swift, we used to be able to list out the login fields with a pipe delimiter. Each value that was added to the list of fields for the login view, needed to have a .value on it for Swift to compile it.
The ".value" solution is not working anymore on Xcode 6 beta 4 error : 'PFLogInFields' does not have a member named 'value'
Is anyone else seeing this issue, or does anyone know what we need to change to get around this?
Thanks.
The right way that worked to me in the last ios 8.1 and xcode 6.1 and latest parse 1.5 was:
By example, if you want only username and password box, login and signup button and forget password:
logInController.fields = PFLogInFields.UsernameAndPassword | PFLogInFields.LogInButton | PFLogInFields.SignUpButton | PFLogInFields.PasswordForgotten
Same issue here. I've tried many solutions and the only working one I found was to pass the bit patterns directly:
logInController.fields = PFLogInFields(00000001 | 00000010 | 00000100 | 00001000 | 00010000)
In this way I was able to show all the fields.
来源:https://stackoverflow.com/questions/24996787/parse-baas-ios-loginfields-in-swift-value-should-be-changed-to