More than usually we need to apply the functions of Pause and Resume/Play for our games. In Mac’s cocos2D programming it’s more than simple. Simply use the following code for Pause & Resume where ever you want!
/*For Pausing the game*/
[[CCDirector sharedDirector] pause]; [self pauseSchedulerAndActions]; //Call for pausing all schedulers and actions
/*For Resuming/Playing back the game*/
[[CCDirector sharedDirector] resume]; [self resumeSchedulerAndActions]; // Call for resuming all schedulers and actions