📅  最后修改于: 2022-03-11 15:01:01.344000             🧑  作者: Mango
swift 5
myTextfield.attributedPlaceholder =
NSAttributedString(
string: "placeholder text",
attributes: [
NSAttributedString.Key.foregroundColor: UIColor.red
]
)