Ios 如何在验证后关闭警报视图?

Ios 如何在验证后关闭警报视图?,ios,swift3,uialertview,Ios,Swift3,Uialertview,我使用了SCLARTVIEW用于忘记密码在这里,我放置了一个文本字段来输入电子邮件,这样在成功验证后,它只需要隐藏,没有这个就不应该隐藏。有人能帮我实现吗 我的代码如下所示 @IBAction func forgetPasswordButton(_ sender: Any) { let appearance = SCLAlertView.SCLAppearance(showCloseButton: true) let alert = SCLAlertView(ap

我使用了
SCLARTVIEW
用于
忘记密码
在这里,我放置了一个
文本字段
来输入
电子邮件
,这样在成功验证后,它只需要隐藏,没有这个就不应该隐藏。有人能帮我实现吗

我的代码如下所示

@IBAction func forgetPasswordButton(_ sender: Any) {
        let appearance = SCLAlertView.SCLAppearance(showCloseButton: true)
        let alert = SCLAlertView(appearance: appearance)
        let txt = alert.addTextField("Enter your emailid")
        _ = alert.addButton("Submit", action: {
            let action = txt.text
                print(action as Any)
        })
        if(txt.text?.isEmpty)! == true{

        }else{

        }
        _ = alert.showEdit("Forgot Password", subTitle:"Please enter your email address below.You will receive a link to reset your password",closeButtonTitle: "Cancel")
    }

使用
hideView()
的属性并调用like

let action = txt.text
            print(action as Any)
       alert.hideView() 
    })

如需更多参考,您可以在未经验证的情况下获取样本

,它不应隐藏irequired@Thiru-对不起,兄弟,我对我的项目有很多疑问,我可以用你的手机号码联系你吗profile@Thiru-当然可以,我的兄弟。