Hi Guys,
I have some situations where I want a UIImageView that is normally in the background,
to become the front layer (it has a lot of transparent area).
Is the best way to remove the view and then add it again in the right order?
Or should I create a duplicate of the back layer, put one in front,
and one at the back at all times, and keep one or the other clear?
I guess the question I'm asking is about the overhead for iOS in going
one way or the other. Some part of iOS must have to draw this extra
blank layer to the screen, even if we don't have to do it manually right?
I have some situations where I want a UIImageView that is normally in the background,
to become the front layer (it has a lot of transparent area).
Is the best way to remove the view and then add it again in the right order?
Code:
[backImageView removeFromSuperview]; // remove and add again to bring background to the front
[frontImageView removeFromSuperview];
[self.view addSubview:frontImageView];
[self.view addSubview:backImageView];
Or should I create a duplicate of the back layer, put one in front,
and one at the back at all times, and keep one or the other clear?
I guess the question I'm asking is about the overhead for iOS in going
one way or the other. Some part of iOS must have to draw this extra
blank layer to the screen, even if we don't have to do it manually right?