Fix the color the passwords
- in the password editing view - color of some characters
This commit is contained in:
parent
2899f05a73
commit
ca66cd8e6c
3 changed files with 9 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ class Utils {
|
|||
for (index, element) in plainPassword.unicodeScalars.enumerated() {
|
||||
if NSCharacterSet.decimalDigits.contains(element) {
|
||||
attributedPassword.addAttribute(NSForegroundColorAttributeName, value: Globals.red, range: NSRange(location: index, length: 1))
|
||||
} else if NSCharacterSet.punctuationCharacters.contains(element) {
|
||||
} else if !NSCharacterSet.letters.contains(element) {
|
||||
attributedPassword.addAttribute(NSForegroundColorAttributeName, value: Globals.blue, range: NSRange(location: index, length: 1))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue