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 6152341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:54:14+00:00 2026-05-23T19:54:14+00:00

My app has several UIViewControllers in a stack (under a UINavigationController). In certain cases

  • 0

My app has several UIViewControllers in a stack (under a UINavigationController). In certain cases I get memory warnings when I’m in the inner UIViewControllers (mostly happens if the device is overloaded with other applications running in the background). When these memory warnings occur the application keeps on running (most of the times) and then when it gets back to the rootViewController it reloads it but doesn’t fill in the view objects (mostly UIButton images).

I wish to implement didReceiveMemoryWarning and applicationDidReceiveMemoryWarning, but I’m not clear regarding to how to do that.

The end result I’m looking for is that when the application does this “reload” after memory warning it will “reload” rootViewController in the same status it was before the user started “diving” into the inner UIViewControllers.

  • How should I do the implementation?
  • Should I implement the default didReceiveMemoryWarning in each UIViewController?
  • Since the memory warning always occur in the inner UIViewControllers, how should I let the rootViewController know that it should run didReceiveMemoryWarning?
  • How do I tell the rootViewController which settings it should do? In other words – can I keep the settings someplace where didReceiveMemoryWarning doesn’t delete them and upon activating didReceiveMemoryWarning “recall” them so the user will see the same screen they started the “levels navigation” from?
  • 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-05-23T19:54:15+00:00Added an answer on May 23, 2026 at 7:54 pm

    Any non-visible view controller on the UINavigationController stack will dump its view. It will also send you the warning. If you have large data structures being held by the view controllers you should dump those if possible.

    The root (an other) controllers should appropriately handle viewDidUnload and be able to cycle through another loadView/viewDidLoad phase.

    If you want the state to be the same, you need to be persisting all that information. NSUserDefaults is a standard location to do that.

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

Sidebar

Related Questions

My app has several buttons which trigger different events. The user should NOT be
I'm working on a PHP app that has several objects that can be commented
I have a folder in my WPF app Images that has several .png files
My product has several components: ASP.NET, Windows Forms App and Windows Service. 95% or
I have a winforms app and the main (and only) form has several buttons.
I have a document-based Core Data app. My main Core Data entity has several
I'm building an app that has several different sections to it, all of which
I'm a newb iPhone developer writing an app that has several large JPGs and
I have a view based app. Its self.view has several subviews and shouldAutorotateToInterfaceOrientation is
I've created an app that has several models (say A, B) that are polymorphically

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.