I have a UIView container in which there are two UIImageView inside, one of which partially obscures the other (they are designed to allow random animation of one "layer" or the other.
Sometimes I want to make this container 50% alpha, so users see fade. Here's the problem: setting my container view to 50% alpha makes all my subtitles inheritable and the same, and now you can see through the first subview in the second that in my application it has a strange x-ray effect, which Iโm not looking for.
What I am after, of course, for what the user currently sees, to become 50% transparent is the equivalent of smoothing the visible view into a single bitmap, and then creating that 50% alpha.
What are my best rates for this? Ideally, I would like to avoid actually, dynamically smoothing my views, if I can help, but also the best practices in this greeting. Am I missing something? Since most views have subqueries and will run into this problem, I feel like there is some obvious solution here.
Thanks!
EDIT: Thanks for the thoughts of the people. I just move one image on top of another image, which it only partially hides. And this pair of images must sometimes move together. And sometimes I want it all to disappear, wherever it is, and whatever the state of the pair of images at the moment. Later I want to return it and continue the animation.
Taking a snapshot of the container, either by rendering its layer (?), Or by doing some other off-screen layout on the fly, before alpha from all of this is definitely possible, and I know that there are a couple of ways to do this. But what if the animation should continue while all this is 50% alpha, for example?
There seems to be no obvious solution to what I'm trying to do, which seems strange to me, but thanks to everyone for their contribution.