zoukankan      html  css  js  c++  java
  • 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肯定知道在哪里!这里是屏幕和内容关系,模拟器图也有。


  • 相关阅读:
    poj3268(Silver Cow Party)最短路
    关于Phaser
    关于StampedLock
    关于AQS
    关于Exechanger
    关于Semaphore
    关于CyclicBarrier
    关于CountDownLatch
    关于BlockingQueue
    关于ThreandLocal
  • 原文地址:https://www.cnblogs.com/keanuyaoo/p/3343491.html
Copyright © 2011-2022 走看看