5

view diagram

Hello,

Looking for insight from the gurus.

I need a stack of 3 views:

A: View containing various buttons, text inputs.
B: Custom view containing a large view (B2) that moves and rotates and contains multiple subviews and another fixed view (B1) that has a custom gradient transparency mask.
C: Image view containing a background image

I can't figure out how to get the B1 layer working. I can make the gradient but am unsure on how to apply the mask so it only affects the transparency of the subviews of B2. I need the background (C) to show through all the way to the top view (A). Was thinking of using a mask directly on B2, but can't since it is moving around. Confused.

Any advice?

Ty Kroll
  • 1,385
  • 12
  • 27

1 Answers1

0

Have you tried using the mask layer of the B's layer? Try to set it to B1 (not as a subview/sublayer) and update its position as necessary when moving B2.

Szabi Tolnai
  • 434
  • 5
  • 5