iOS 11.0 UITextField secureTextEntry 不起作用?

标签 ios uitextfield ios11

我发现secureTextEntry在iOS 11.0上不起作用,我的代码很简单,如下所示:

tfPwd1.keyboardType = UIKeyboardTypeNumberPad;
tfPwd1.secureTextEntry = YES;
tfPwd1.delegate = self;

我该如何解决这个问题?

最佳答案

.secureTextEntry 更改为 .isSecureTextEntry

希望它有用。

关于iOS 11.0 UITextField secureTextEntry 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44799925/

相关文章:

ios - 移动到另一个导航 Controller 时,后退按钮变得无响应

iOS - UITableViewCell 被 UITabBar 覆盖

ios - UITextField 的 resignFirstResponder 既不工作也不工作 self.view.endEditing()

ios - UISearchBarSearchField BackgroundView 颜色

ios - 在 Swift 的 iOS 应用程序中显示表格(在 html/Excel 电子表格中的意思)

ios - 在 iOS 上读取文档存储 ("Store documents & data on") 设置的值

聚焦时 tvOS 中的 UITextField 边框

ios - UITextField 中的渐变文本

ios - 如何检测 iOS 中的圆角屏幕角

swift - 带有 NavigationBar LargeTitle 和 SearchController 消失的 iOS 11 UIRefreshControl