Landscape-only app still autorotates to portrait in iOS7

前端 未结 1 1702
孤独总比滥情好
孤独总比滥情好 2021-01-24 11:12

After updating to iOS7, my app shows autorotation. I want it to be a landscape-only app and, accordingly, I set up everything as follows: In iOS6 was fine.

相关标签:
1条回答
  • 2021-01-24 11:46

    Try like this,

    - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
    {
        return UIInterfaceOrientationLandscapeLeft;
    }
    
    - (NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskLandscape;
    }
    - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
    {
        return (UIInterfaceOrientationMaskLandscape);
    }
    
    0 讨论(0)
提交回复
热议问题