Let me clarify that the app which is running in foreground goes to inactive state and then it transitions to background state.The foreground app transitions to the inactive state and then to the background state.
When the app goes to inactive state,app delegate's applicationWillResignActive: is called and when the app goes to background state,app delegate's applicationDidEnterBackground:method is called.
Most Important iPhone interview Questions and Answers
Top iOS interview Questions And Answers Collection
iOS Interview Questions And Answers For 1-2 years Experienced Candidates.
After the app moves to background state,it may move to the suspended state afterward or still continue to run for a while longer.
Apps that is waiting for some background tasks (such as playing music) or that has requested for some extra execution time from system may continue some background task for a while .