Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 如何在所有ios设备的所有屏幕中设置背景?_Objective C_Xcode_Ios Simulator - Fatal编程技术网

Objective c 如何在所有ios设备的所有屏幕中设置背景?

Objective c 如何在所有ios设备的所有屏幕中设置背景?,objective-c,xcode,ios-simulator,Objective C,Xcode,Ios Simulator,我用SpriteHelper创建了Sprite工作表。在spritehelper中创建背景时,图片大小为1920 x 1280。如何在所有屏幕中为所有设备制作背景 CGSize winSize = [CCDirector sharedDirector].winSize; CCSpriteBatchNode *sprites_for_game; sprites_for_game = [CCSpriteBatchNode batchNodeWithFile:@"sprite

我用SpriteHelper创建了Sprite工作表。在spritehelper中创建背景时,图片大小为1920 x 1280。如何在所有屏幕中为所有设备制作背景

  CGSize winSize = [CCDirector sharedDirector].winSize;

  CCSpriteBatchNode *sprites_for_game;      
  sprites_for_game = [CCSpriteBatchNode batchNodeWithFile:@"sprite_UntitledSheet.png"];

  [[CCSpriteFrameCache sharedSpriteFrameCache]addSpriteFramesWithFile:@"sprite_UntitledSheet.plist"];
   [self addChild:sprites_for_game];
        CCSprite *sprite = [CCSprite spriteWithSpriteFrameName:@"background"];
        sprite.position = ccp(winSize.width/2,winSize.height/2);
        [sprites_for_game addChild:sprite];
iphone佩蒂娜3.5英寸

iphone petina 4.0英寸

ipad佩蒂娜请帮助我正确设置所有设备的发布图像?我想是的。我在spriteHelper中创建了通用应用程序。