I have a problem with my app. I would like lock rotation on specific view. For that, I use rootviewcontroller which contain two custom viewControllers. I have try to override the shouldAutorotateToInterfaceOrientation method on my two viewcontrollers but if I allow all rotation on my rootViewController, all my viewcontrollers can rotate like my rootviewcontroller and I don't understand why.
Actually I use this configuration :
RootviewController
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//By default, i allow all rotation
return YES
}
FirstCustomviewController
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//On my first viewController, I allow only orientation in portrait
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
But in all case, it allow all rotation (I think it come from rootviewcontroller) and why I can't override this method ? What can I do for that ?
Thanks