Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:48:03+00:00 2026-06-10T05:48:03+00:00

I have seen a lot of posts on stack overflow stating that the viewDidLoad

  • 0

I have seen a lot of posts on stack overflow stating that the viewDidLoad method of controllers is only called the first time the controller is accessed and not necessarily every time but always at least once.

This is not what I am seeing at all! I put together a simple test to highlight this:
https://github.com/imuz/ViewDidLoadTest

It seems for navigation controller segues and modal views viewDidLoad is always called. The only time it is not called is when switching between tabs.

Every explanation of viewDidLoad I can find contradicts this:

  • When is viewDidLoad called?
  • UIViewController viewDidLoad vs. viewWillAppear: What is the proper division of labor?
  • http://www.manning-sandbox.com/thread.jspa?threadID=41506

And apples own documentation indicate that a view is only unloaded when memory is low.

I am currently doing initialisation in viewDidLoad making the assumption that it is called with every segue transition.

Am I missing something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:48:05+00:00Added an answer on June 10, 2026 at 5:48 am

    I believe the Apple documentation is describing a situation where the view controller is not being deallocated. If you use a segue, then you are causing the instantiation of a new destination controller and, being a new object, it needs to load a view.

    In xib-based apps, I have sometimes cached a controller object that I knew I might re-use frequently. In those cases, they behaved in keeping with the documentation in terms of when a view had to be loaded.

    Edit:
    On reading the links you included, I don’t see any contradiction in them. They, too, are talking about things that happen during the lifespan of a view controller object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been checking a lot of posts here in Stack Overflow, Rails documentation
I have seen a lot of software that show that which registry has error.
I have seen many posts and questions about Mocking a private method but still
I have read a few other posts on Stack Overflow and did some Googling
Lately I have seen a lot of blog posts concerning how to build loosely
I have seen a lot of posts on this topic, however I have not
I have seen there are a lot of 'order by relevance' posts on here...
I have seen lot projects following this kind of coding style Any significant advantage
I have seen a lot of people in the C++ community(particularly ##c++ on freenode)
I have seen a lot of old articles on SO. So i am asking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.