Pergunta

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!

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top