Simple iPad app.
App loads and displays a UITableView controlled by a subclass of UIViewController. This works and rotates perfectly.
Clicking on a row in the table view causes a new subview to be created, also controlled by a UIViewController subclass. This displays fine in portrait but does not adjust to landscape and does not respond to device rotation.
Both of the view controllers have inlcuded:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
NSLog(@"Responding to rotation");
return YES;
}
However only the original view controller responds to this:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
NSLog(@"View About to rotate");
}
In IB I have checked that the view will autoresize and the components within it (a UIScrollView and some UILabels) will adjust properly.
Can anyone help me in working out why the subview isn't responding.?