zoukankan      html  css  js  c++  java
  • ios设备相关

    设备方向

    typedef NS_OPTIONS(NSUInteger, UIInterfaceOrientationMask) {
        UIInterfaceOrientationMaskPortrait = (1 << UIInterfaceOrientationPortrait),
        UIInterfaceOrientationMaskLandscapeLeft = (1 << UIInterfaceOrientationLandscapeLeft),
        UIInterfaceOrientationMaskLandscapeRight = (1 << UIInterfaceOrientationLandscapeRight),
        UIInterfaceOrientationMaskPortraitUpsideDown = (1 << UIInterfaceOrientationPortraitUpsideDown),
        UIInterfaceOrientationMaskLandscape = (UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
        UIInterfaceOrientationMaskAll = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown),
        UIInterfaceOrientationMaskAllButUpsideDown = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
    } __TVOS_PROHIBITED;
    ---------------app代理级别------------------------
    -(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
    {
        return UIInterfaceOrientationMaskLandscape;
    }
    
    ---------------视图控制器级别----------------
    - (BOOL)shouldAutorotate
    {
        return YES;
    }
    -(UIInterfaceOrientationMask)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskLandscapeLeft;
    }
  • 相关阅读:
    洛谷 P1282 多米诺骨牌
    【2017杭二联考】穿越矩形
    【2017杭二联考】 图的有向环
    树状数组
    Test2014-3-1 魅力值比较
    NOI2007 货币兑换
    POI2001 金矿
    太空飞行计划问题
    Genotype&&陨石的秘密
    usaco 土地并购 && hdu 玩具装箱
  • 原文地址:https://www.cnblogs.com/jingdizhiwa/p/5755754.html
Copyright © 2011-2022 走看看