Disabled UIButton not faded or grey

后端 未结 19 1615
死守一世寂寞
死守一世寂寞 2020-12-04 16:11

In my iPhone app, I have a UIButton which I have created in Interface Builder. I can successfully enable and disable it like this in my code ...

sendButton.e         


        
19条回答
  •  猫巷女王i
    2020-12-04 16:35

    Another option is to change the text color (to light gray for example) for the disabled state.

    In the storyboard editor, choose Disabled from the State Config popup button. Use the Text Color popup button to change the text color.

    In code, use the -setTitleColor:forState: message.

提交回复
热议问题