开发者

Nested UIViewController does not respond to device rotation

I'm developing an app using a fork of LeavesViewController that changes to a two-page orientation when the device turns to landscape.

When using the Leaves controller alone, everything works fine.

When using the Leaves controller inside the view of my main UIViewController, it never gets any of the device rotation messages (however my main UIViewController does).

What can I do to make the Leaves c开发者_如何学Pythonontroller reaceive the device rotation messages?

Thanks.


You're not supposed to nest UIViewControllers like that. In practice you can, but they're not managed by UIKit so you lose the functions that are usually called by the framework (viewWillAppear: and friends, I think).

You can forward the rotation methods yourself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜