This question already has an answer here:
- How to make a UIView always appear at the front? 4 answers
Hi I have a game where I create a subview that handles touch events. But when I add other objects later in the code, they appear in front of that view. So if the user tap the screen on one of these objects the touch won't be registered.
So is there a way to make a UIView always appear on the top?
I have tried this, but it doesn't work:
view.layer.zPosition = MAXFLOAT;
Any ideas? Thanks