2010-03-08 54 views
0

我有一个视图内的tabbarcontroller和navigationcontroller和我的'willAnimateRotationToInterfaceOrientation'方法不会触发。willAnimateRotationToInterfaceOrientation not firing iphone UIInterfaceOrientation

我已经将视图设置为FirstResponder,并且shouldAutorotateToInterfaceOrientation返回YES;

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) 
interfaceOrientation { 
     return YES; 

} 
-(BOOL)canBecomeFirstResponder 
{ 
    return YES; 
} 

[self becomeFirstResponder];

回答

1

如果您在应用程序内部使用UITabBarController,那么UITabBarController中的所有UIViewControllers都应该支持自动旋转。否则,您将不会收到自动回送回调。