My viewController1
has a child view controller (viewController2
). viewController2.view
is a subview of viewController1
's view. At the user's action, I remove the view of viewController2
from it's superview. After a while I have to add it again as subview.
The problem is that if the user rotates the device while viewController2
is not visible, after adding it again to viewController1's view, it's frame and it's subviews are placed as the device was still in the old orientation. Even the viewController2.view.frame
has the height and with interchanged.
Does anyone have a solution to this? Thanks in advance!