views:

52

answers:

1

When I place a view controller's view inside a top level view controller, the UIInterfaceOrientation I get from the nested view controller is incorrect. If I get the orientation from the top level view controller, I get the correct one. The interfaceOrientation property is readonly, so I can't simply set it. How can I get my nested view controller to recognize the proper orientation?

Apple may not recommend using nested view controllers, but I'm using them for reusability (Universal app).

A: 

I have had this issue quite a bit as well, and the only fix i have found is to either call the child view's willRotateToOrientation: method whenever you call the parents, or if you want to check when you load, to do something like [[view2.superview viewController] imageOrientation]

basically you have to handle it yourself and its a pain.

Jesse Naugher