首次登录应用后自动填充iOS12警报消息用户以保存密码吗? [英] Autofill iOS12 alert message user to save password after login to the app first time?

查看:266
本文介绍了首次登录应用后自动填充iOS12警报消息用户以保存密码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用本教程"iOS 12密码工具:改善用户安全性和体验" 一切正常,但是首次登录时,iOS并没有提示UIAlert提示我保存密码.我想问一下如何触发UIAlert提示用户第一次将密码保存到钥匙串中?

I'm implementing autoFill to my iOS app using this tutorial "iOS 12 Password Tools: Improving User Security and Experience" everything work fine but the iOS is not prompt me with UIAlert to save the password when I login for the first time. I want to ask how I can trigger the UIAlert to prompt the user to save the password to keychain first time?

推荐答案

您必须清除文本字段并删除View层次结构的视图.

you have to clear the text fields and remove the view for View hierarchy.

注意:在Xcode 10中,您可以使用将用户名密码保存在模拟器中.

Note: with Xcode 10 you can use save the username password in the simulator.

override func viewDidDisappear(_ animated: Bool) {
    super.viewDidDisappear(animated)
    view.endEditing(true)

    txtfEmail.text =  nil
    txtfPassword.text = nil
}

这篇关于首次登录应用后自动填充iOS12警报消息用户以保存密码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆