Search code examples
iosswiftuitextfield

UITextField placeholder changes when using dark theme


When using the Dark appearance, placeholder color of UITextField becomes lighter and becomes unreadable.

Same showed up for UILabel when using the default color for the label but once I've changed to Black color, it shows properly.


Solution

  • In your info.plist, set a new key ‘UIUserInterfaceStyle’ with value as ‘Light’.

    After setting that, even in dark mode no font color will be changed