Search code examples
uinavigationcontrollersubviews

Relocate views in the navigationcontroller


Is it possible to relocate a uiview that I've added as a subview of a viewcontroller? This is my problem:

navigationcontroller stack -> viewcontroller -> rectangle view

When I change the device orientation I want to relocate the rectangle view. How can I access that rectangle subview?

Thanks for your knowledge.


Solution

  • You can tag the view, which is probably what you want (so you can get it back later with viewWithTag) or run through subviews array looking for it.