Disabled UIButton not faded or grey

后端 未结 19 1439
死守一世寂寞
死守一世寂寞 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条回答
  • 2020-12-04 16:53

    You can use following code:

    sendButton.enabled = YES;
    sendButton.alpha = 1.0;
    
    or
    
    sendButton.enabled = NO;
    sendButton.alpha = 0.5;
    
    0 讨论(0)
提交回复
热议问题