Is it possible to make a UIView (and any other subviews within it) set to an opacity of say 0.5 or whatever? Not sure if this is even possible, but want to ask.
Asked
Active
Viewed 2.2k times
1 Answers
69
view.alpha = 0.5; // Doesn't it work?

Vladimir
- 170,431
- 36
- 387
- 313
-
3I think you mean view.alpha = 0.5; That should do it, along with all its subviews. – Ben Gottlieb Feb 25 '10 at 14:16
-
2View opacity and alpha both are different, if we change view alpha, all the subviews in tat view will be effected, if you change opacity only the particular view will be effected. – MANCHIKANTI KRISHNAKISHORE Aug 04 '17 at 08:15