简体   繁体   中英

Operator | cannot be applied to two “PFLoginFields” operands Swift

here is the code

override func viewDidAppear(animated: Bool) { 
    super.viewDidAppear(animated)
    if (PFUser.currentUser() == nil) {
        self.LogInViewController.fields = PFLogInFields.SignUpButton | PFLogInFields.PasswordForgotten | PFLogInFields.DismissButton
    }
}

King Regards

Replace

PFLogInFields.SignUpButton | PFLogInFields.PasswordForgotten |  PFLogInFields.DismissButton

with

[.SignUpButton, .PasswordForgotten, .DismissButton]

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