Yes, This is one of the serious problem in cocos2D 2.0. When I try in init method of first scene.
Instead of init try onEnter.
-(void)onEnter
{
[super onEnter];
CGSize winSize = [[CCDirector sharedDirector]winSize];
//Place all your init functions here.
}
Note:
In iphone5, missing [email protected] also result wrong size!!!
Cocos2d 3.0:
CGSize s = [[CCDirector sharedDirector] viewSize];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…