我必须创建一个自定义类来在XIB中设计textField,并在我的viewController中多次重用它。我想以编程方式更改每个占位符名称。
发布于 2019-03-25 17:37:21
您可以通过以下两种方式进行更改
1) yourTextField.placeholder = "some string"
2) yourTextField.attributedPlaceholder = NSAttributedString(string: "some string")
https://stackoverflow.com/questions/55334748
复制相似问题