开发者

willAnimateRotationToInterfaceOrientation not firing iphone UIInterfaceOrientation

开发者_如何学运维

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜