I'm trying to set the placeholder text colour of a UISearchField in iOS 13 (beta).
My code worked in iOS 12 and before. I can still change the UISearchField background colour, the colour of the search icon, and so on...
Here's what I'm trying:
searchTextField.attributedPlaceholder = NSAttributedString(
string: "My placeholder text",
attributes: [
NSAttributedString.Key.foregroundColor: UIColor.red
]
);
I expect the placeholder text to now be red, but it remains grey.