2017-05-03 63 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在出口昔日的文本字段