when you are developing game or app in ios, you should handle these events ,users may press HOME button or LOCK button ,or your application may get interrupted during call ,SMS . Now i hope that you understand the reason why we should handle that ,for this problem apple has some delegate functions in app delegate
this method invokes when application enters background(HOME button pressed).
this method invokes when application become active and about to start running your app.
this method invokes when application resigns active.
this method invokes when your app comes to foreground.
these methods are life cycle codes in iphone development.
expecting your feedback.Thank you