アプリにこの機能を実装したいのですが、このコード行の使用方法がわかりません。
- (void)applicationWillResignActive:(UIApplication *)application {
//our app is going to loose focus since there is an incoming call
[self pauseGame];
}
- (void)applicationDidBecomeActive:(UIApplication *)application{
//the user declined the call and is returning to our app
[self resumeGame];
}
これは appdelegates に配置する必要があることを読みましたが、ゲームが現在ビューコントローラーにあるときに一時停止アクションを呼び出す方法がわかりません。
ありがとうございました。