Adapt UI with respect to Dark Mode
This commit is contained in:
parent
35bac7260b
commit
414e31cba3
7 changed files with 24 additions and 25 deletions
|
|
@ -22,11 +22,11 @@ public class Utils {
|
|||
for (index, element) in plainPassword.unicodeScalars.enumerated() {
|
||||
var charColor = UIColor.darkText
|
||||
if NSCharacterSet.decimalDigits.contains(element) {
|
||||
charColor = Globals.digitColor
|
||||
charColor = Globals.red
|
||||
} else if !NSCharacterSet.letters.contains(element) {
|
||||
charColor = Globals.symbolColor
|
||||
charColor = Globals.blue
|
||||
} else {
|
||||
charColor = Globals.letterColor
|
||||
charColor = Globals.black
|
||||
}
|
||||
attributedPassword.addAttribute(NSAttributedString.Key.foregroundColor, value: charColor, range: NSRange(location: index, length: 1))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue