2

ガードレットの使用中に致命的なエラーが発生しました。エラーは次のとおりです。

条件付きバインディングの初期化子には、「文字列」ではなくオプションの型が必要です

私が使用した私のコードの下:

@IBAction func signUpButtonPressed(sender: UIButton) {
    guard let email = emailTextField.text! where emailTextField.text!.characters.count > 0 else {
        // alert
        return
    }

    guard let password = passwordTextField.text! where passwordTextField.text!.characters.count > 0 else {
    // alert
       return
   }

     self.registerUserAsync(email, password: password)
}
4

2 に答える 2