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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With