IOS gradient transparent mask over animated view

view diagram

Hello,

Seek an understanding of the guru.

I need a stack of three views:

A: view containing various buttons, text inputs.
B: A custom view containing a large view (B2) that moves and rotates and contains several subzones and another fixed view (B1) that has its own transparent gradient mask.
C: Image containing background image

I can't figure out how to make layer B1 work. I can make a gradient, but I'm not sure how to apply the mask so that it affects only the transparency of B2 subzones. I need background (C) to show all the way to the top view (A). Thought to use the mask directly on B2, but can not, as it moves. Confused

Any tips?

+5
source share
1 answer

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

0
source

All Articles