Swift:找不到'|'的重载接受提供的参数 [英] Swift: Could not find an overload for '|' that accepts the supplied arguments
本文介绍了Swift:找不到'|'的重载接受提供的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试将Parse合并到一个新的Swift项目中。
Trying to incorporate Parse into a new Swift project.
当我到达这个区块时:
logInViewController.fields = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten
我在XCode 6中收到此错误:
I'm getting this error in XCode 6:
Could not find an overload for '|' that accepts the supplied arguments
任何人都知道该语法有什么问题?
Anyone happen to know what's wrong with that syntax?
推荐答案
使用 .value
然后使用结果创建 PFLogInFields
实例:
Use the .value
then use the result to create a PFLogInFields
instance:
logInViewController.fields = PFLogInFields(PFLogInFieldsUsernameAndPassword.value
| PFLogInFieldsLogInButton.value)
这篇关于Swift:找不到'|'的重载接受提供的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文