Cocos2d - Setting Device/Screen Orientation

前端 未结 6 1011
情话喂你
情话喂你 2021-01-15 17:31

I am new to the cocos2d API and have noticed that there are a few ways to set the screens orientation within the templates. I have not been able to figure out the correct wa

6条回答
  •  死守一世寂寞
    2021-01-15 18:26

    if you added shouldAutorotateToInterfaceOrientation and not solved your problem

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        return UIInterfaceOrientationIsLandscape(interfaceOrientation);
    }
    

    THEN Try to add this line to appDelegate.m

    [window_ setRootViewController:navController_];
    

    Good Luck

提交回复
热议问题