By d开发者_运维技巧efault, we get the opacity of UIButton set to NO. Can we set it to YES?
Um... opacity
is not a boolean value. It is a float
in the range from 0.0 (fully transparent) to 1.0 (fully opaque). The property is actually called the alpha
, so you'd do:
[myButton setAlpha:0.42];
setAlpha doesn't work in In swift:
photoButton.alpha = 0.3
精彩评论