改变UITextField PlaceHolder的字体和颜色,不影响正常输入
生活随笔
收集整理的這篇文章主要介紹了
改变UITextField PlaceHolder的字体和颜色,不影响正常输入
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
話不多說上代碼,主要是KVC
labName.text = @"銀行卡號";
? ? ? ? ? ? textField.placeholder = @"本人的儲蓄卡或者借記卡卡號";
? ? ? ? ? ?[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
? ? ? ? ? ? [textField setValue:[UIFont boldSystemFontOfSize:12] forKeyPath:@"_placeholderLabel.font"];
轉載于:https://www.cnblogs.com/daaiwusehng/p/4797639.html
總結
以上是生活随笔為你收集整理的改变UITextField PlaceHolder的字体和颜色,不影响正常输入的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: POJ 1679 The Unique
- 下一篇: 解决scrollView像素自动下移的办