I don't know if by Apple's rules it's necessary to implement that when a user is in the middle of a game, if they click on home button the game pauses and when they click back in game, the game unpauses.
Do I have to click something on storyboard for a home button to appear? I don't know.
Since storyboards has no home button on it so how do I code that when user clicks home button to exit the app, the game pauses. When they return again, the game unpauses.
There are two way to implement it:
1: use
NSNotificationCenter
:2: Use
UIApplicationDelegate
delegate Method