Affecting Z Order for UIImageView

iphone, uiimageview

Solution

You can use the following if the `UIImageView` is already a subview:

- `bringSubviewToFront`

- `sendSubviewToBack`

or any of the following if you're inserting the `UIImageView` as a subview:

- `insertSubview:atIndex`

- `insertSubview:aboveSubview`

- `insertSubview:belowSubview`

Problem

Anyone know how to programmatically set the z order of UIImageViews? The order of instancing them will bring the last one instanced closest to the screen front, but how can it be changed at runtime? Thanks // :)

Original source