Reputation: 1
I found that secureTextEntry
doesn't work on iOS 11.0, my code is simple like this:
tfPwd1.keyboardType = UIKeyboardTypeNumberPad;
tfPwd1.secureTextEntry = YES;
tfPwd1.delegate = self;
What can I do to solve this problem?
Upvotes: 0
Views: 1162
Reputation: 3405
Do you call [tfPwd1 becomeFirstResponder]
anywhere? Add tfPwd1.secureTextEntry = YES;
before calling [tfPwd1 becomeFirstResponder]
. Don't add it while UIKeyboard
is present
Upvotes: 0
Reputation: 4425
I just check on my system its working with this code
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
txtfld.isSecureTextEntry = true
}
Upvotes: 0
Reputation: 285
change .secureTextEntry
to .isSecureTextEntry
hope it works.
Upvotes: 1