diff --git a/pass/Helpers/Utils.swift b/pass/Helpers/Utils.swift
index 726e107..462c83c 100644
--- a/pass/Helpers/Utils.swift
+++ b/pass/Helpers/Utils.swift
@@ -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))
}
}
diff --git a/pass/Views/FillPasswordTableViewCell.swift b/pass/Views/FillPasswordTableViewCell.swift
index b7a9ae0..e97edde 100644
--- a/pass/Views/FillPasswordTableViewCell.swift
+++ b/pass/Views/FillPasswordTableViewCell.swift
@@ -33,6 +33,11 @@ class FillPasswordTableViewCell: ContentTableViewCell {
self.delegate?.generateAndCopyPassword()
}
+ // re-color
+ @IBAction func textFieldDidChange(_ sender: UITextField) {
+ contentTextField.attributedText = Utils.attributedPassword(plainPassword: sender.text ?? "")
+ }
+
override func getContent() -> String? {
return contentTextField.attributedText?.string
}
diff --git a/pass/Views/FillPasswordTableViewCell.xib b/pass/Views/FillPasswordTableViewCell.xib
index 0f6d8b2..c27362f 100644
--- a/pass/Views/FillPasswordTableViewCell.xib
+++ b/pass/Views/FillPasswordTableViewCell.xib
@@ -27,6 +27,9 @@
+
+
+