gpt4 book ai didi

xcode - 在后台使用 Parse 的注册时出现 Swift 问题

转载 作者:可可西里 更新时间:2023-11-01 01:06:19 25 4
gpt4 key购买 nike

在后台使用 Parse 的注册 block 时,我遇到了 Swift 的问题

  func Signup()
{
var user = PFUser()
user.username = self.username.text
user.password = self.password.text
user.email = "email@example.com"


user.signUpInBackgroundWithBlock {
(succeeded: Bool! , error:NSError!) -> Void in
if (error != nil)
{

}
else
{
let errorString = error.userInfo["error"] as? NSString
}
}
}

然后我得到了这两个错误

http://s15.postimg.org/geexdxwob/image.png

最佳答案

  func Signup()
{
var user = PFUser()
user.username = self.username.text
user.password = self.password.text
user.email = "email@example.com"


user.signUpInBackgroundWithBlock {
(succeeded: Bool , error:NSError!) -> Void in
if (error != nil)
{

}
else
{
let errorString = error.userInfo["error"] as? NSString
}
}
}

关于xcode - 在后台使用 Parse 的注册时出现 Swift 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28726114/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com