开发者

willAnimateRotationToInterfaceOrientation not firing iphone UIInterfaceOrientation

开发者 https://www.devze.com 2022-12-22 00:42 出处:网络
开发者_如何学运维I have a view inside a tabbarcontroller and navigationcontroller and my \'willAnimateRotationToInterfaceOrientation\' method is not firing.
开发者_如何学运维

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

精彩评论

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

关注公众号