Reputation: 39
I have a UITextField in my iOS app where the background turns yellow automatically when iOS suggests a strong password. This behavior is handled automatically by iOS. However, in dark theme mode, the text in the UITextField becomes difficult to read against the yellow background.
The UITextField should maintain readable text color or adjust automatically to ensure readability when the background turns yellow due to iOS suggesting a strong password.
I have already tried adjusting the text color programmatically based on the UITextField's state and background color. I am using standard UITextField properties and have not overridden any default behaviors related to password suggestion handling.
`if passwordTextField.isSecureTextEntry {
passwordTextField.textColor = .label
} else {
passwordTextField.textColor = .black
}`
Upvotes: 2
Views: 77