How do you set the placeholder color of iOS 13\'s UISearchTextField?
I tried the following with no success:
searchField.attributedPlaceh
I found the following code snippet worked:
DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
// Stackoverflow said the above doesn't work on viewDidLoad style methods, so running it async after a 0.5s delay to workaround. Works.
searchField.attributedPlaceholder = NSAttributedString(string:"Search", attributes: attributesDictionary)
}