Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What the equivalent of activity life cycle in iOS?

Actually, I would say that both iOS ViewControllers and Android Activities have their lifecycle methods. For example an equivalent of ViewController.viewDidLoad() is Activity.onCreate() ?

Else I still need to know the equivalent of the other :

  • OnStart()
  • OnRestart()
  • OnResume()
  • OnStop()
  • OnDestroy()
  • OnPause()
like image 599
Cool Avatar asked Mar 10 '15 16:03

Cool


People also ask

What is equivalent of activity in iOS?

We can say Activity is equivalent to ViewController, since it has its own lifecycle( onCreate in Android and viewDidLoad in iOS) but not fully.

What is iOS life cycle?

The application life cycle constitutes the sequence of events that occurs between the launch and termination of application. It is very important to understand for all the iOS Developers, who wants smooth user experience.

Is service life cycle is same as activity lifecycle?

The lifecycle for a service is similar to that for an activity, but different in a few important details: onCreate() and onStart() differences: Services can be started when a client calls the Context.

At what stage of life cycle is of Android app?

An Android activity goes through six major lifecycle stages or callbacks. These are: onCreate() , onStart() , onResume() , onPause() , onStop() , and onDestroy() . The system invokes each of these callbacks as an activity enters a new state.


1 Answers

This is a comparison between the lifecycle of Android vs iOS:

enter image description here

  • Note: viewDidUnload is deprecated after iOS 6
like image 146
Jorgesys Avatar answered Oct 13 '22 00:10

Jorgesys