Sprite Kit を用いたアプリで、マルチタスクを用いる方法です。



こちらのstack overflowの記事 を引用すると、

AppDelegate に spritekitをimportした上で、

- (void)applicationWillResignActive:(UIApplication *)application
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
    // pause sprite kit
    SKView *view = (SKView *)self.window.rootViewController.view;
    view.paused = YES;

- (void)applicationDidBecomeActive:(UIApplication *)application
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    // resume sprite kit
    SKView *view = (SKView *)self.window.rootViewController.view;
    view.paused = NO;