iPhone/iPad App Orientation

后端 未结 4 1326
天命终不由人
天命终不由人 2021-01-22 10:24

The iPhone version of my app supports UIDeviceOrientationPortraitUpsideDown and UIDeviceOrientationPortrait, but the iPad version supports all Orientat

4条回答
  •  感动是毒
    2021-01-22 11:02

    Figured it out, the iOS6 SDK uses shouldAutorotate so here is my new code:

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
        return YES;
    }
    
    -(BOOL)shouldAutorotate {
         return YES;
    }
    
    -(NSUInteger)supportedInterfaceOrientations {
        return UIInterfaceOrientationMaskAll;
    }
    

提交回复
热议问题