iOS 5: willRotateToInterfaceOrientation:duration not called when first loading controller

后端 未结 4 1157
花落未央
花落未央 2020-12-16 04:23

I\'ve implemented this method in my code to know when an interface orientation change will occur:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrient         


        
4条回答
  •  时光取名叫无心
    2020-12-16 04:48

    Even I faced a similar issue and had to override it in the tabbarcontroller derived class to get this to work:

    - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
    {
        [_tabBarConroller willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
        [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
    }
    

    Hope this helps!!

提交回复
热议问题