Throughout our app we generally override layoutSubviews for setting text/background colours on UI elements to support dark mode switching. We have encountered an issue with a custom UITextField class (subclass) we use for all our text fields throughout the app.
We override layoutSubviews and set five background colours within it. No changes are made to any constraints on any views. This works as expected on iOS 13 and above. However when testing on iOS 11 and 12 simulators, after typing a couple of letters in a text field, layoutSubviews ends up being called over and over in an infinite loop and freezing the app.
We have worked around this issue (although it was a pain to debug as it wasn't initally clear it was a text field issue) but it would be interesting to know if anyone else has had similiar issues and some sort of explanation why this might happen. It definitely seems like a bug.