Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.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
Ios uiviewcontroller调用SKScene时出现性能问题_Ios_Objective C_Uiviewcontroller_Sprite Kit - Fatal编程技术网

Ios uiviewcontroller调用SKScene时出现性能问题

Ios uiviewcontroller调用SKScene时出现性能问题,ios,objective-c,uiviewcontroller,sprite-kit,Ios,Objective C,Uiviewcontroller,Sprite Kit,我对spritebuiler不熟悉 当我试图在uiviewconroller上调用skscene时,我遇到性能问题。i、 例如,我正在开发一个关于精灵工具包的游戏 我的项目有两个名为GameViewConroller的视图控制器、LevelSelectController和两个名为MainMenuScene&GameSecene的SKScenes。当应用程序运行时调用MainMenuScene,它包含levelselect按钮和playbutton,如果我按下play按钮,它将移动到游戏场景,游

我对spritebuiler不熟悉

当我试图在uiviewconroller上调用skscene时,我遇到性能问题。i、 例如,我正在开发一个关于精灵工具包的游戏

我的项目有两个名为GameViewConroller的视图控制器、LevelSelectController和两个名为MainMenuScene&GameSecene的SKScenes。当应用程序运行时调用MainMenuScene,它包含levelselect按钮和playbutton,如果我按下play按钮,它将移动到游戏场景,游戏在这里播放,所以我在游戏场景中播放的动画非常平滑和精细

如果我按下MainMenuScene上的levelselect按钮,它会移动到LevelSelectController。当我按下任何按钮时,它会移动到游戏场景,游戏在这里播放,所以游戏场景中播放的动画非常缓慢

帮帮我,我卡住了

   @implementation GameViewController
   - (void)viewDidLoad
  {
     [super viewDidLoad];

// Configure the view.
SKView * skView = (SKView *)self.view;
/* Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = YES;

// Create and configure the scene.


SKScene *scene = [[MainMenuScene alloc] initWithSize:self.view.frame.size];
scene.scaleMode = SKSceneScaleModeAspectFill;

   // Present the scene.
   [skView presentScene:scene];
   }

你能显示一些代码吗?检查一下我添加了一些代码。这就是我所说的情景,你需要缩小你的问题范围。您发布的代码是标准的当前场景代码,无助于识别问题。请尝试在真实设备上进行测试。此外,查看纹理地图集。