2017-05-03 18 views
-1

我建立谁拥有获取所需的地址和用户的一些信息的应用程序。我有一个UIViewController中有三个UITextFields,我希望像这样显示图像的每个文本字段的占位符。如何创建一个自定义的UITextField占位符雨燕3.0

的模型设计的UIViewController中

Click Here to see the Picture

我怎么能这样做?

+1

该文档是在这里:https://developer.apple.com/reference/uikit/uitextfield – matt

回答

0

对于多线型,占位符考虑使用attributedPlaceholderNSAttributedString允许修改字符串/风格不同的部分。

0

你需要尝试这

Txtpwd.attributedPlaceholder = NSAttributedString(字符串 “文本”,属性:[NSForegroundColorAttributeName = UIColor.darkGray])

凡TXTPwd在出口昔日的文本字段