Question

I have an application made by a UITabBar with three tabs. One of these is a UIViewController in which I implemented the willRotateToInterfaceOrientation to change the orientation and position of my views.

Everything works except when that view is not the currently shown. In that case willRotateToInterfaceOrientation is not invoked and my views are not set. Which is the best place where to set the new positions and sizes of those views when that tab is not the shown one? How would you implement this?

Thanks!

Was it helpful?

Solution

Just in case anyone else need this, I solved simply by setting the frames in the viewWillAppear method of the UIViewController, in case the orientation has changed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top