Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you have one view be a subview for several different views for iPhone?

Is it possible to add the same view instance as a subview of two different views at the same time? I'm trying to do this but it only shows up on the last one it was added as a subview to.

like image 662
Marty Avatar asked Dec 12 '22 16:12

Marty


1 Answers

No, a view can only be in a single view hierarchy at a time. If you add it to another view, it will automatically be removed from its previous view. Also, if you add it to the same view that it was already in, it will automatically be removed and re-added as the top-most item (however, this is much less efficient than just simply changing its position directly).

like image 130
Jason Coco Avatar answered Dec 26 '22 10:12

Jason Coco