iPhone Application Lifecycle
I just went through one presentation for iPhone application. So this post to share what I understood.
First of all the main focus is how actually iPhone applications work.
When user touches the icon of the application main() gets called by the system.
main() creates the autoreleasepool and starts the application with UIApplicationMain object. UIApplicationMain creates the instance of the UIApplication which actually starts the application.
UIApplication loads the main nib file and sets the application. Then UIApplication forwards the events to interface elements.
For terminating the application user taps home button, UIApplication tells the delegate that application is terminating. And so UIApplication gets exited , then main gets exited. This way the process ends.
This is the way iPhone applications works.