Reputation: 233
I got a Tetris game and when the game is being played and after the application goes into the background, it continues working so that the player loses the game after a period of time. I want to make my game paused when the application is phased down.
How can I respond to changes in the state of the application (background or foreground)?
Upvotes: 0
Views: 238
Reputation: 17218
Have your app delegate implement -applicationWillResignActive:
and pause the game.
Upvotes: 1