Labels and text inside Text Field becoming white automatically for iOS 13 Dark mode

前端 未结 5 1890
既然无缘
既然无缘 2021-02-05 10:38

My app works fine for iOS versions below 13.0 but when i updated the device to iOS 13 and chose Dark Mode, the labels are going white(which were black earlier) automatically whi

5条回答
  •  星月不相逢
    2021-02-05 11:44

    Change textField text color to black (don't leave default color) and place holder color using below code

    yourTextField.attributedPlaceholder = NSAttributedString(string: "Password", attributes: [NSAttributedString.Key.foregroundColor: UIColor.lightGray])
    

提交回复
热议问题