CClayer无法全屏显示

时间:2012-07-10 06:35:22

标签: ios cocos2d-iphone fullscreen cclayer

我正在尝试设置背景图层颜色而不是图像。二手CClayer。但它只显示右边的保证金。保证金可能是黑色或空白。如何全屏显示?

+(CCScene *) scene
{
    CCScene *scene = [CCScene node];
    HomeLayer *layer = [HomeLayer node];
    [scene addChild: layer];
    return scene;
}

-(id) init
{
   if( (self=[super init])) {
        CCLayerColor *colorLayer = [CCLayerColor layerWithColor:ccc4(100, 20, 200, 100) width:screenSize.width height:screenSize.height];
        [self addChild:colorLayer z:1];  
     }
 return self;
}

0 个答案:

没有答案