• cocos2d-x ios 设置横屏/竖屏(全)


    Cocos2d-x项目iOSRootViewController.mm文件中。

    以下方法任选其一即可…      本人机子函数二ok!


    函数一:

    (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

        return UIInterfaceOrientationIsLandscape( interfaceOrientation );

    //    return (UIInterfaceOrientationIsPortrait( interfaceOrientation ));

    }

     

    函数二:

    - (NSUInteger) supportedInterfaceOrientations{

    #ifdef __IPHONE_6_0

        return UIInterfaceOrientationMaskLandscape;

    //     return UIInterfaceOrientationMaskPortrait;

    //    直式显示: protrait

    //    横式显示: landscape

    #endif

    }


    函数三:

    - (BOOL) shouldAutorotate {

        returnYES;

    //    return NO;

    }


    还有最后关键的一点:

    用xcode肯定知道在哪里!这里是屏幕和内容关系,模拟器图也有。


  • 相关阅读:
    oracle10g安装问题
    oracle10g卸载问题
    c编译过程
    根文件系统制作
    Handler消息传递机制
    Glide图片加载库的使用
    关于FragmentPageAdapter
    Android中set标签的使用
    overridependingtransition方法
    关于View
  • 原文地址:https://www.cnblogs.com/keanuyaoo/p/3343491.html
Copyright © 2020-2023  润新知