0
SwiftとParseでサインアップビューコントローラをコーディングし始めますか?私はコンソールの出力(印刷を示さなかった既存の電子メールやパスワードを記述しようとすると、ユーザー名または電子メールは、解析クライアントにswiftでのPFErrorCodeの処理
let query = PFQuery(className:"_User")
query.whereKey("email", equalTo: email)
query.findObjectsInBackground { (succeeded, error) -> Void in
newUser.signUpInBackground{(success, error) -> Void in
// The find succeeded.
print("Successfully retrieved scores.")
if success {
// Do something with the found objects
let alertMessage = UIAlertController(title: "Register complated", message: "You've been registered.", preferredStyle: UIAlertControllerStyle.alert)
let okAction = UIAlertAction(title: "Ok", style: UIAlertActionStyle.default, handler: nil)
alertMessage.addAction(okAction)
self.present(alertMessage, animated: true, completion: nil)
}
// Log details of the failure
// username is exists
else {
if PFErrorCode.errorUsernameTaken.rawValue == 202 {
print ("Username is exists")
}
else if PFErrorCode.errorUserEmailTaken.rawValue == 203 {
print ("E-mail is exists")
}
}
を取られている場合は サインアップは同じ)のチェックを持っています私が望むもの
Hey nts、私は、アクションボタンの中に拡張子をコピーし、コンパイラにいくつかのエラーポップがありました。 – user2508528
拡張子を別のファイルに貼り付けてください(例:PFErrorCode + Equatable) – nathan
Hey nts、あなたが書いた拡張機能を試しましたが、3つのエラーメッセージが表示されました。あなたはもっと具体的にどこに拡張を置くべきですか? – user2508528