ios 修改UITextView的placeholder的颜色

阅读更多

问题解决地址:

 

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)!])

 

 

你可能感兴趣的:(ios,swift,placeholder,color)