本文介绍了验证后如何关闭警报视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 SCLAlertView 用于 forgot password 在这里我放置了一个 textfield 来输入 email 所以在成功验证后只需要隐藏它不应该隐藏任何人都可以帮助我如何实现它?

I had used SCLAlertView used for forgot password in this i had placed a textfield to enter email so that after making successful validation only it need to hide without this it should not hide can anyone help me how to implement this ?

我的代码如下

@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

use the property of hideView() and call like

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

要获得更多参考,您可以在这里

for more reference you can get the sample here

这篇关于验证后如何关闭警报视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 11:02