My code fragment is very small:
self.textField.textColor = color
This is called in response to user interaction. It has been working for years. On my iOS 10 device it still works. On my iOS 11 device, the color does not change until I tap in the text field.
Bug? Feature? Workaround? Suggestions welcome.
You might need to update/reset your UITextField text right after the color change:
self.textField.textColor = color
self.textField.text = "Hi! I've changed of color!!"
Andrew update, more practical stuff:
self.textField.textColor = color
self.textField.text = self.textField.text
I can trigger the text color change to take effect by adding this line below the single line cited above:
self.textField.text = self.textField.text
However, given the facts above, it still looks to me like a bug outside of my code. Or, at least, a change of the implicit class contract.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With