ITeye博客

ios 修改UITextView的placeholder的颜色

2014马年 · 2016-04-01 18:38 · ios · 移动开发 · Markdown

问题解决地址:

 

http://stackoverflow.com/questions/26076054/changing-placeholder-text-color-with-swift

 

1.如下图,加入 _placeholderLabel.textColor

 

 

2.使用代码

textFld.attributedPlaceholder =NSAttributedString(string:"Test Data for place holder", attributes:[NSForegroundColorAttributeName:UIColor.blueColor(),NSFontAttributeName:UIFont(name:"Arial", size:10)!])

 

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。