Changing Placeholder Text Color with Swift

前端 未结 30 2329
独厮守ぢ
独厮守ぢ 2020-11-29 15:57

I have a design that implements a dark blue UITextField, as the placeholder text is by default a dark grey colour I can barely make out what the place holder te

30条回答
  •  有刺的猬
    2020-11-29 16:16

    crubio's answer update for Swift 4

    Select the UITextField and open the identity inspector on the right:

    Click on the plus button and add a new runtime attribute: placeholderLabel.textColor (instead of _placeholderLabel.textColor)

    Use Color as type and select the color.

    If you run your project, you will see the changes.

提交回复
热议问题