5

I have a superview containing two overlapping subviews (one pink and one green). When changing the opacity of the parent view, the subviews show the overlapping section (even though they are fully opaque). How can I make it so the view as a whole fades out, not the individual subviews. I've also tried changing the opacity of the CALayer. Here is a screen:

two overlapping views

A full version of the code can be found here.

Kevin Sylvestre
  • 37,288
  • 33
  • 152
  • 232

1 Answers1

3

Your answer can be found here iOS controlling UIView alpha behaviour for subviews.

Basically set the UIViewGroupOpacity.

Community
  • 1
  • 1
Koppo
  • 591
  • 4
  • 15