IO6 doesn't call -(BOOL)shouldAutorotate

后端 未结 2 1359
失恋的感觉
失恋的感觉 2021-01-01 06:58

I have some views in my app that I don\'t want to suport orientation. In didFinishLaunchingWithOptions I add navigation:

...
UINavigationControl         


        
2条回答
  •  一整个雨季
    2021-01-01 07:48

    in the AppDelegate:

    - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window  // iOS 6
    {
    
    return UIInterfaceOrientationMaskAll;
    
    
    }
    

    in your ViewController:

    - (BOOL)shouldAutorotate {
    return YES;
    }
    
    - (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskPortrait;
    }
    

提交回复
热议问题