There are two UIViewControllers: MyParentViewController, and MyToolbarViewController. MyParentViewController manages a view which fills most of the screen. MyToolbarViewController is a subview of MyParentViewController, and manages a comparatively small view at a higher z-index than the view managed by its parent, MyParentViewController.
Because MyParentViewController’s view is higher up in the view hierarchy, its shouldAutorotateToDeviceOrientation method seems to trump that of MyToolbarViewController’s. Whatever it returns is the value that is used. I am not seeing MyToolbarViewController’s didAutorotateFromDeviceOrientation get called, however. Is it my responsibility to override MyParentViewController didAutorotateFromDeviceOrientation and call the method on the subview?
In iOS 4.x, Apple defines all the “legal” container controllers (split view, table view, navigation view, and tab view). Those controllers manage all view management methods (
viewWill…,viewDid…,shouldAutoRotate…) and forward them appropriately.If you try to do something similar, none of those methods are forwarded. Currently, if you need to act on these methods, the “top” controller is responsible for that.
[read between the lines for a future answer]