【发布时间】:2015-02-19 12:56:18
【问题描述】:
在注册过程中,用户可能会导致一些错误,例如 用户名已被占用,电子邮件地址无效等...
Parse 在错误对象中返回所有需要的信息,请参阅http://parse.com/docs/dotnet/api/html/T_Parse_ParseException_ErrorCode.htm
我不知道如何使用它们,例如如何访问它们以编写一个开关来捕捉所有可能性:
user.signUpInBackgroundWithBlock {
(succeeded: Bool!, error: NSError!) -> Void in
if error == nil {
// Hooray! Let them use the app now.
self.updateLabel("Erfolgreich registriert")
} else {
println(error.userInfo)
}
}
如何切换可能的错误代码编号? 请指教 谢谢!
【问题讨论】:
标签: ios swift parse-platform