I have a view inside a tabbarcontroller and navigationcontroller and my 'willAnimateRotationToInterfaceOrientation' method is not firing.
I have set the view to be FirstResponder and also shouldAutorotateToInterfaceOrientation returning YES;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)
interfaceOrientation {
return YES;
}
-(BOOL)canBecomeFirstResponder
{
return YES;
}
[self becomeFirstResponder];
If you're using UITabBarController inside your application then all of UIViewControllers inside UITabBarController should support autorotation. Otherwise you will not receive autorotation callbacks.
精彩评论