UIButton title disappears

前端 未结 5 1645
囚心锁ツ
囚心锁ツ 2021-01-20 03:52

I have a ViewController with an UIButton inside. When I clicked, the text on the button disappeared. I add all the setTitle for all states, but it continues disappearing. An

5条回答
  •  礼貌的吻别
    2021-01-20 04:34

    As Jack says, it's the "selected" state of the button that has got the same color of the background. You can change that color also in the Storyboard:

    • select the button
    • in Attributes Inspector -> State Config -> select "highlighted"
    • select the correct "text color"

提交回复
热议问题