I have the following code in my UIViewController subclass, however the willAnimateROtationToInterface is never called. Any idea why?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return YES;
}
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
}
UPDATE: The parent's view controller orientation changes delegate is getting called however not this one. I added this view controller as a subview of the parent's view controller
The parent view controller is a UINavigationController, so here's how I am adding the subview:
[self.navController.view addSubview:viewController.view];