开发者

Changing orientation in a UITabBar of a hidden UIViewController

I have an application made by a UITabBar with three tabs. One of these is a UIViewController in which I implemented the willRotateToIn开发者_JAVA技巧terfaceOrientation 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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜