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.
精彩评论