Rotation behaving differently on iOS6

后端 未结 12 2198
野的像风
野的像风 2020-11-30 06:00

I did an App which is tab-based. Nothing needs to be on landscape mode but a couple of views. It worked OK on iOS5 and I was pretty happy with the result. However with iOS6

12条回答
  •  春和景丽
    2020-11-30 06:43

    I have a good solution for cross 5.0 to 6.0 working - All of the above with

    -(BOOL)shouldAutorotate{return [self shouldIRotateAnyiOS];}//iOS6
    
    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{return [self shouldIRotateAnyiOS];}//pre iOS6
    
    -(BOOL)shouldIRotateAnyiOS{
    UIInterfaceOrientation interfaceOrientation = [[UIDevice currentDevice] orientation];
    //do the rotation stuff
    return YES
    }
    

提交回复
热议问题