`
2014马年
  • 浏览: 118812 次
  • 性别: Icon_minigender_1
  • 来自: 晋中
社区版块
存档分类
最新评论

ios 修改UITextView的placeholder的颜色

    博客分类:
  • ios
阅读更多

问题解决地址:

 

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

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics