UIButton won't gray out

前端 未结 5 1403
后悔当初
后悔当初 2020-12-30 21:37

Isn\'t UIButton supposed to become grayish/grayer when enabled=NO ?

I have a simple UIButton on a blackbackground (no custom images, no custom nothing, just dragged

5条回答
  •  有刺的猬
    2020-12-30 21:53

    There is no way to make a UIButton "grayer". But you can use that trick :

    UIButton *myButton;
    myButton.alpha = 0.4;
    myButton.enabled = NO;
    

    So your UIButton looks like unusable ;)

提交回复
热议问题