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

  • Home
  • SEARCH
  • 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 8471447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:47:53+00:00 2026-06-10T16:47:53+00:00

Edited title I am using Core Data to store some data I collect from

  • 0

Edited title

I am using Core Data to store some data I collect from my server. In appDelegate‘s applicationDidBecomeActive, I check if the app needs to download new data (from a version-variable on my server). If it has old information, it downloads the new data.

The problem is, in some of my views, I have tableViews. And these get their data from an array of data extracted from Core Data in viewDidLoad.
When opening the app, and the viewDidLoad has already been called, and THEN it updates the data in Core Data, when I then enter the views with tableView, all the rows are wrong. In my case, all the rows shows the same image as the first row, and none of them have any text. I am thinking that the old array has some corrupt data which needs to be reloaded.. As I am writing this I realize that viewDidLoad needs to be called again. Or at least the code in viewDidLoad. I do not want to move it to viewDidAppear or willAppear, because that will mean that this happenes everytime.
I thought about force-restarting the process, but I read that this wasn’t possible, and that Apple would reject a force quit anyway.

Actually, I kinda just need to know how to programmatically unload all views from AppDelegate, so that they will have to call viewDidLoad again. Or force a viewDidLoad again.

  • 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-10T16:47:55+00:00Added an answer on June 10, 2026 at 4:47 pm

    If you cannot use a fetched results controller, you could
    register for the NSManagedObjectContextObjectsDidChangeNotification:

    [[NSNotificationCenter defaultCenter] addObserver:self
        selector:@selector(contextChanged:)
        name:NSManagedObjectContextObjectsDidChangeNotification
        object:theManagedObjectContext];
    

    and reload the data only if necessary:

    - (void)contextChanged:(NSNotification *)note
    {
        // reload your table data
    }
    

    Don’t forget to remove the observer, e.g. in dealloc:

    [[NSNotificationCenter defaultCenter] removeObserver:self]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I prevent a window title from displaying Edited for an NSDocument which
Using Microsoft's AntiXssLibrary, how do you handle input that needs to be edited later?
Sorry for the title but I don't know other way of asking. EDITED FOR
EDITED I'm using Twitter Bootstrap and need to move navbar right( not float:right, but
Edited Question: This should be clear. using System; namespace UpdateDateTimeFields { class Program {
I'm trying to upload an edited version of a .txt file to Dropbox using
I am uploading some images using plupload and adding those images to div container.And
I've already got some code to read a text file using fscanf() , and
As the title says, in my code, when I search in my app happens
I am extracting XML from a table using FOR XML clause. select maincode as

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.