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

 

猜你喜欢

转载自20142014.iteye.com/blog/2288087