Thursday, November 21, 2013

iOS App life cycle

Today will see the iOS App life cycle, mainly on
1) The App Launch Cycle
2) The View Controller Life Cycle

1) The App Launch Cycle

Lets see as soon as you tap on any application icon to open any iOS app in your device springboard what will happen,

- As part of the launch cycle, the iOS system creates a process and main thread for your app and calls your app’s main function on that main thread.

- The default main function that comes with your Xcode project promptly hands control over to the UIKit framework, it will initialize your app and prepares it to run.

Below flowchart (diagram from Apple’s developer docs: https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/Art/app_launch_fg_2x.png) will show the sequence of events that occurs when an app is launched into the foreground


The main function’s main job is to hand control to the UIKit framework.

2) The View Controller Life Cycle

Now lets see once your app is launched then say your first screen (Root/Home View Controller), how it will load in to the screen in other words the view controller life cycle hierarchy,
If you are creating your UI or View programmatically then the first method which gets called is loadView, followed by viewDidLoad -> viewWillAppear -> viewDidAppear  and while moving to the next screen or view Controller the hierarchy of methods are like viewWillDisappear -> viewDidDisappear -> viewDidUnload  

Note: In iOS 6 and later, viewDidUnload method is deprecated since views are no longer purged under low-memory conditions.

viewDidLoadCalled only once during the initial load of interface builder(.xib) file. Initial set up of view controller can be taken care here.

viewWillAppear – This method gets called just before your view appears or renders on screen every time when you navigate or switch between different views. Suppose if you want to update your view different while switching back and forth based on some requirement for that kind of dynamic changes to the views can be done here.

viewDidAppear – Once your view loads completely on screen this method gets called and here you can handle further UI or functionalities w.r.t your view controller like database call or whatever you want to do after loading your view.

viewWillDisappear - This method is called before the view is actually removed and before any animations are configured. Notifies the view controller that its view is about to be removed from a view hierarchy.

viewDidDisappear - This method notifies the view controller that its view was removed from a view hierarchy, here you can perform additional tasks associated with dismissing or hiding the view.

viewDidUnload - Called when the controller’s view is released from memory. In iOS 6 and later, clearing references to views and other objects in your view controller is unnecessary. In iOS 6 and later, viewDidUnload method is deprecated.


 Hope this post is helpful,any comments or suggestions is acceptable.



84 comments:

  1. Awsome Explanation brother..............

    ReplyDelete
  2. Replies
    1. @ravindra Firstly many thanks for liking and following my blog, yep sure I will come up with many more tutorials soon, since I was busy with my daily schedule I was unable to post frequently.
      Thanks :)

      Delete
  3. It’s really amazing that we can record what our visitors do on our site. Thanks for sharing this awesome guide. I’m happy that I came across with your site this article is on point,thanks again and have a great day. Keep update more information..


    iOS Training in Chennai

    ReplyDelete
  4. I am expecting more interesting topics from you. And this was nice content and definitely it will be useful for many people.

    Mobile App Development Company in Chennai
    Android app Development Company in Chennai
    ios app development Company in Chennai

    ReplyDelete
  5. Great article,we are providing IOS online training you can check it out

    ReplyDelete
  6. Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best. Hire iPhone Developers India

    ReplyDelete
  7. Good article write and good Information share this Article. Android app Development company In India

    ReplyDelete
  8. Nice post. Thanks for sharing and upgrading our information.
    Best iPhone mob app training in Jaipur

    ReplyDelete
  9. Extraordinary and helpful article. Making content consistently is extremely intense. Your focuses are roused me to proceed onward.


    digital marketing

    ReplyDelete
  10. Magnificent design and great utilization of fluctuated media. Truly inside and out data also. Extremely like how you separate the points into a few subsections with their own pages.


    iphone 8 plus case


    ReplyDelete
  11. The article is good.I got some knowledge about iOS.Thanks for sharing this blog.
    iOS Training In Chennai | iOS Training Institute In Chennai

    ReplyDelete
  12. The Content was super and useful.Thankyou for posting this blog.I got some knowledge.
    iOS Training In Chennai | iOS Training Institute In Chennai

    ReplyDelete
  13. I liked the way of presention.Its good and Informative.Thank you for posting this article
    iOS Training In Chennai | iOS Training Institute In Chennai

    ReplyDelete
  14. This article gave good information.Thank you for posting this article.
    iOS Training In Chennai | iOS Training Institute In Chennai

    ReplyDelete
  15. This is an one of the excellent blog.I liked your way of presentation.I gained some Information.Thank you for posting this articleiOS Training In Chennai | iOS Training Institute In Chennai

    ReplyDelete
  16. The Presentation of the article is good.I learned new topics.Thankyou for posting this blog
    iOS Training In Chennai | iOS Training Institute In Chennai

    ReplyDelete
  17. After I read and endeavor to comprehend this article lastly amazingwe are for the most part appreciative for the presence of this article can include considerably more knowledge for every one of us. much obliged to you.


    Accountants Brighton

    ReplyDelete
  18. I've been surfing on the web over 3 hours today, yet I never found any fascinating article like yours. It's enough worth for me. As I would see it, if all web proprietors and bloggers made exceptional substance as you did, the net will be basically more productive than at whatever point in late memory.

    Brighton Accountants

    ReplyDelete
  19. I've been surfing on the web more than 3 hours today, yet I never found any stupefying article like yours. It's imperatively worth for me. As I would see it, if all web proprietors and bloggers made confusing substance as you did, the net will be in a general sense more profitable than at whatever point in late memory.

    Tax Advisors

    ReplyDelete
  20. definitely this would made by professional blogger. You are great buddy, getting help since 2017. thank you so much.

    E Filing Services Dubai

    Tax consultancy services in dwarka

    ReplyDelete
  21. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. 
    python course in pune | python course in chennai | python course in Bangalore

    ReplyDelete
  22. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    Devops Training courses
    Devops Training in Bangalore
    Best Devops Training in pune
    Devops interview questions and answers

    ReplyDelete
  23. I am really very happy to find this particular site. I just wanted to say thank you for this huge read!! I absolutely enjoying every petite bit of it and I have you bookmarked to test out new substance you post.

    angularjs interview questions and answers

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in chennai

    automation anywhere online Training

    ReplyDelete
  24. fantabulous blog. Its amazing to wonder here and goes through some best articles. Thank you.

    real estate dealer in dwarka

    ReplyDelete
  25. This is a good post. This post give truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. thank you so much. Keep up the good works.
    Java training in Bangalore | Java training in Electronic city

    Java training in Bangalore | Java training in Marathahalli

    Java training in Bangalore | Java training in Btm layout

    Java training in Bangalore | Java training in Jaya nagar

    ReplyDelete
  26. Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might be interested in hearing.


    AWS Training in Pune | Best Amazon Web Services Training in Pune

    ReplyDelete
  27. I am really enjoying reading your well written articles.
    It looks like you spend a lot of effort and time on your blog.
    I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..
    Java Training in Bangalore
    Best Java Training Institutes in Bangalore
    Java Course in Bangalore
    Java Training Institutes in Bangalore
    Java Institutes in Bangalore
    Java Classes in Bangalore
    hadoop training in bangalore
    big data training in bangalore

    ReplyDelete
  28. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information.

    rpa training in chennai
    rpa training in bangalore
    rpa course in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  29. Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up. 
    python interview questions and answers
    python tutorials
    python course institute in electronic city

    ReplyDelete
  30. This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb.
    This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here 


    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  31. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  32. The High Profile Escorts girls are accessible nearly in all Delhi areas for grown-up diversion of the men. In any case, it could be troublesome difficult for you to trust that they give their administrations according to the desires for the men.

    Vip Escorts In Delhi
    High Profile Escorts In Delhi
    Vip Escorts In Delhi
    Independent Escorts In Delhi
    High Profile Escorts In Delhi
    Vip Escorts In Delhi
    High Profile Escorts In Delhi
    Independent Escorts In Delhi
    Independent Escorts in Delhi
    High Profile Escorts in Delhi
    Vip Escorts in Delhi

    ReplyDelete
  33. Hi,
    Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take python training in bangalore. Because Python course in Bangalore is one of the best that one can do while choosing the course.

    ReplyDelete
  34. training-hipaa.net, one of the strongest wings of our company, the Supremus Group is basically into providing HIPAA related training to all health care entities at different levels. Our unique training methodologies, different training methods, and flexible courses make us one of the strongest contenders in this field. Founded in the year 2006 with the intention of providing comprehensive HIPAA training to help the healthcare organizations meet their compliance standards, we have come a long way by venturing out into other streams of HIPAA training that focus on the security and privacy aspects at different levels.
    HIPAA Training Officer Security

    ReplyDelete
  35. This is a very amazing and informative post..
    Thanks for sharing with us,
    We are again come on your website,
    Thanks and good day,
    If you need any logo then,
    Please visit our site,
    buylogo

    ReplyDelete
  36. Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!!
    Please check this ExcelR Digital Marketing Courses in Pune

    ReplyDelete

  37. Good Post! it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article, I want to say that also a well-written article with some very good information which is very useful for the AWS Online Training

    ReplyDelete
  38. Great! This article is packed full of constructive information. The valuable points made here are apparent, brief, clear and poignant. I am sincerely fond of your writing style.
    SAP training in Mumbai
    SAP course in Mumbai

    ReplyDelete
  39. By reading this article, many things have piled up in my mind which made me to think about it. You have put some high quality and valuable information here that any reader would love to read. I sincerely share many of your views in this article.
    SAP training in Kolkata
    SAP course in kolkata

    ReplyDelete
  40. Awesome post. Good Post. I like your blog. You Post is very informative. Thanks for Sharing.
    DevOps Training in Chennai

    DevOps Course in Chennai

    ReplyDelete
  41. Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it. Sell Apple Developer Account

    ReplyDelete
  42. if you are a top businessman person you might be looking for in-call Hotel escorts in Ahmedabad or a celebrity escort in Ahmedabad. After determining this you can check their physical absence over their pictures and look for an apt height, weight and more relations, which seduce you well. Then you can check with the hiring through agency about her attitude and performance and go for a person who has all you need.
    Escorts in Ahmedabad
    Call Girls in Ahmedabad
    Ahmedabad Escorts

    ReplyDelete

  43. Calangute is a town in the western state og Goa standing on the shores of the Arabian sea. It's home to long, sandy Calangute Beach, lined with bars and resturents.
    Calangute Call GirlCalangute is famus among the family voyagers because of its comparative calm to the Baga Beach. Calangute has astellar and outstanding reputation on escort review sits. Over the main year Calangute has been in the Escort Business. WE have worked with many TOP CLASS ESCORTS , FEMALE ESCORTS who love to please their clientele . They have the looks and importantly the personality , that makes them a sought often ESCORT IN CALANGUTE . A high parcentege of our clinte are repeated customers. Call Girl in Goa Some have used the agency for year. we consider feedback from our clients to be very important and we always do our best respond . ESCORT IN CALANGUTE can be booked for INCALL OR OUTCALL BOOKINGS . The astounding TOP MODEL CALANGUTE ESCORTS are available at your doorstep to provide the sexual satisfaction.
    Goa Escorts
    Calangute Call Girl

    ReplyDelete
  44. Good work nice information Very well explained thank so much for sharing this valuable information. Looking for the best IOS app development services in Hyderabad contact Cyanous software solutions now.

    Best IOS app development services in Hyderabad
    Best software & web development company in Hyderabad

    ReplyDelete
  45. Really nice way to present your blog and information is also too good. Thanks for sharing it. If you are searching for professional job oriented courses than visit here:-

    Digital Marketing Course In Jaipur
    Web Designing Course In Jaipur
    Python Training in Jaipur
    Data Science Course in Jaipur
    Artificial Intelligence Course In Jaipur
    Online Tally Course

    ReplyDelete
  46. If I can write like you, I will be very happy, but where is my luck, in fact people like you are an example to the world. You have written this comment very beautifully, I am very glad that I thank you from the bottom of my heart. online girl gurgaon
    Online Girl Number Dehradun
    Gurgaon girl number
    housewife Gurgaon
    premium health
    Health Tips
    Rice Cake
    India Rice Cake

    ReplyDelete
  47. It has been simply incredibly generous with you to provide openly
    what exactly many individuals would’ve marketed for an eBook to end
    up making some cash for their end, primarily given that you could
    have tried it in the event you wanted.
    dot net classes in Chennai
    core java training institutes in Chennai
    Best Manual Testing Training in Chennai

    ReplyDelete
  48. Iron-Nosed - titanium iv chloride - TikTok
    ‎Iron-Nosed. titanium wedding bandtitanium pan gold-nosed- microtouch trimmer › gold-nosed- Iron-Nosed. chi titanium flat iron Iron-Nosed. No-In stock. titanium hair

    ReplyDelete
  49. This post is so interactive and informative.keep update more information...
    Salesforce Training in Tambaram
    Salesforce Training in Anna Nagar

    ReplyDelete
  50. This comment has been removed by the author.

    ReplyDelete
  51. Download JPG To PDF Converter - Convert JPG, BMP, TIF, GIF to PDF documents in a quick, efficient manner by turning to this handy app that .Jpg To Pdf Combine Download

    ReplyDelete
  52. This comment has been removed by the author.

    ReplyDelete