2010-03-08 38 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都應該支持自動旋轉。否則,您將不會收到自動回送回調。