Parse BaaS iOS LoginFields in Swift - .value should be changed to?

蓝咒 提交于 2019-12-06 16:15:31

问题


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.


回答1:


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



回答2:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!