iPhone Question: Download iPhone PDF

How can you respond to state transitions on your app?

Tweet Share WhatsApp

Answer:

On state transitions can be responded to state changes in an appropriate way by calling corresponding methods on app's delegate object.

For example:

application Did Become Active method can be used to prepare to run as the foreground app.
application Did Enter Background method can be used to execute some code when app is running in the background and may be suspended at any time.

application Will Enter Foreground method can be used to execute some code when your app is moving out of the background application Will Terminate method is called when your app is being terminated.

Download iPhone PDF Read All 52 iPhone Questions
Previous QuestionNext Question
When an app is said to be in not running state?Assume that your app is running in the foreground but is currently not receiving events. In which sate it would be in?