User UIButton Opacity

By default, we get the opacity of the UIButton set to NO. Can I set the value to YES?

+7
source share
2 answers

Um ... opacity not a boolean. This is a float in the range from 0.0 (fully transparent) to 1.0 (completely opaque). The property is actually called alpha , so you would do:

 [myButton setAlpha:0.42]; 
+24
source

setAlpha does not work In Fast:

 photoButton.alpha = 0.3 
+4
source

All Articles