Landscape-only app still autorotates to portrait in iOS7

前端 未结 1 1701
孤独总比滥情好
孤独总比滥情好 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)
提交回复
热议问题