New issue
 Projects > cocos2d-x > Issues > Bug #4592

[CCEAGLView sharedEGLView] 找不到类方法

Bug #4592 [New]
cicero 2014-03-28 09:18

创建的新lua工程,在RootViewController.mm里面

  • (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];

    CGSize s = CGSizeMake([[CCEAGLView sharedEGLView] getWidth], [[CCEAGLView sharedEGLView] getHeight]);

    cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
    }
    其中下面这一行,在屏幕旋转的时候,会导致exception,找了下CCEAGLView的定义,其中并没有sharedEGLView这个方法
    CGSize s = CGSizeMake([[CCEAGLView sharedEGLView] getWidth], [[CCEAGLView sharedEGLView] getHeight]);

使用的版本是官网上的3.0RC0

Atom PDF

Status:New
Start date:2014-03-28
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:ios
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.