iphone: view index

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-06-18T02:04:21Z Indexed on 2010/06/18 2:13 UTC
Read the original article Hit count: 435

Filed under:
|
|
|

I have a view between other views, the order may vary. For example: viewA on top of viewB, on top of viewC, or in another order.

Suppose I have

viewA, viewB, viewC, viewD and viewE

A is on the top and E on the bottom.

I need to replace viewC with viewZ, but I need to insert viewZ in the same index of viewC.

How do I know, before removing viewC, what index it has, so I can insert viewZ using

[self.view insertSubview:viewZ atIndex:?????)

and it will be at the same level?

thanks for any help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk