How to hide passwords in a UITextField like “*****”?
问题 How to hide passwords in a UITextField like "*****" ? To hide password, i used following code txtPassword.isSecureTextEntry = true but this will display like “•••••••” , but i need like "*******" 回答1: To achieve the same, you can use a normal textfield without the secure input option. When a user enters a character, save it to a string variable, and replace it in the textfield with the character you wish to present instead of the bullets. Set the textField delegate in viewDidLoad() as: