我曾使用SCLAlertView
用于此forgot password
我已经放置textfield
进入email
,以便在成功验证后只需要隐藏它而不用它不应该隐藏任何人可以帮助我如何实现这个?
我的代码如下所示
@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")
}
答案 0 :(得分:0)
使用hideView()
的属性并调用
let action = txt.text
print(action as Any)
alert.hideView()
})
如需更多参考,您可以获得示例here