相关疑难解决方法(0)

处理新Firebase和Swift中的错误

我正在尝试使用swift和firebase在iOS项目中创建用户按钮时添加错误处理:

这是按钮的代码:

     @IBAction func Register(sender: AnyObject) {

    if NameTF.text == "" || EmailTF.text == "" || PasswordTF.text == "" || RePasswordTF == "" || PhoneTF.text == "" || CityTF.text == ""
    {
        let alert = UIAlertController(title: "?????", message:"??? ???? ???? ?? ?????? ????????", preferredStyle: .Alert)
        alert.addAction(UIAlertAction(title: "???", style: .Default) { _ in })
        self.presentViewController(alert, animated: true){}

    } else {

        if PasswordTF.text != RePasswordTF.text {
            let alert = UIAlertController(title: "?????", message:"????? ?????? ??? ?????????", preferredStyle: .Alert)
            alert.addAction(UIAlertAction(title: "???", style: .Default) { …
Run Code Online (Sandbox Code Playgroud)

error-handling ios firebase swift firebase-authentication

16
推荐指数
3
解决办法
1万
查看次数