ios - 首次登录应用后自动填充iOS12提示信息用户保存密码?

标签 ios swift login autofill ios12

我正在使用本教程 "iOS 12 Password Tools: Improving User Security and Experience" 为我的 iOS 应用程序实现自动填充一切正常,但是当我第一次登录时,iOS 没有提示我使用 UIAlert 保存密码。我想问一下如何触发 UIAlert 提示用户第一次将密码保存到钥匙串(keychain)?

enter image description here

最佳答案

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

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

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

    txtfEmail.text =  nil
    txtfPassword.text = nil
}

关于ios - 首次登录应用后自动填充iOS12提示信息用户保存密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55831632/

相关文章:

ios - "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value ' org.cocoapods.FMDB'

ios - SwiftUI 中有 Controller 吗?

javascript - iOS ui 隐藏页面底部。当隐藏和显示 iOS 底部菜单时,如何使整个页面响应并使其底部始终可见?

ios - 更改场景时,应用内购买会导致应用崩溃

login - Hybris hMC 登录配置

ios - 如何使用 justhttp 读取响应 cookie

ios - 如何使 UIImagePickerController crop 16 :9 ratio

ios - UIBezierPath Init() 不期望 byRoundingCorners 参数

authentication - Grails springsecurity LDAP登录,如何按子组限制用户?

laravel - Auth中 "login"和 "attempt"方法有什么区别