I have an app where there is a SpriteKit game, as well as a Main Menu. After clicking the home button, the CPU/Memory don't decrease as they should. I've tried a few things, and the code here is probably redundant, but it hasn't worked for me yet.
Executed whenever the home button is touched:
- (void)goToMainMenu {
[self performSegueWithIdentifier:@"mainmenu" sender:self];
[self.spriteView removeFromSuperview];
self.scene = nil;
[self.spriteView presentScene:nil];
self.spriteView = nil;
self.view = nil;
}
When going back to the game from the main menu, the CPU/Memory only rise.