text field placeholder string as attributed string code example
Example: swift uitextfield placeholder color
myTextField.attributedPlaceholder = NSAttributedString(string: "placeholder text",
attributes: [NSAttributedString.Key.foregroundColor: UIColor.white])