开发者

Autorotation in UINavigationController

There're an UINavigationController with rootViewController (as root) and secondViewController (as a child). The rootViewController should be able to rotate to any orientation (that works as expected, I just override the shouldAutorotateToInterfaceOrientation), but the secondViewController should work in Portrait mode only (here, I set the shouldAutor开发者_Python百科otateToInterfaceOrientation to

interfaceOrientation == UIInterfaceOrientationPortrait

The issue: after navigating to the secondViewController from the rootViewController while in landscape, the secondViewController doesn't switch its UI back to portrait. Is there a right way to do so?


Try putting a

[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];  

After your declaration there. See if that works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜