I've got several UI elements on my screen (programmatically) and am in need of an efficient way to give each subview a z-index setting, so I can stack certain elements over others.
Does anyone have a solution to this?
I've got several UI elements on my screen (programmatically) and am in need of an efficient way to give each subview a z-index setting, so I can stack certain elements over others.
Does anyone have a solution to this?
The plain -addSubview:
method will add the new view on top of its siblings.
There are also a bunch of methods like bringSubviewToFront:
, insertSubview:belowSubview:
, etc. that you can use to manipulate the ordering, listed under "Managing the View Hierarchy" in the UIView Reference