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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:57:25+00:00 2026-05-15T15:57:25+00:00

I have an ipad app that is loading data remotely into core data, I

  • 0

I have an ipad app that is loading data remotely into core data, I was to constantly display a status update to a label but it looks like everything in my method has to be completed before the message is sent to the UILabel.

How do I get around this?

Sample Code:

-(void) importCollections {
/* code left out for brevity */

    for (int j=0; j <[[myCollections objectAtIndex:i] count]; j++)
            {

                Collection  *entity = (Collection*) [NSEntityDescription insertNewObjectForEntityForName:@"Collection" inManagedObjectContext:managedObjectContext];
                [entity setCollectionName:[[[myCollections objectAtIndex:i] objectAtIndex:j] valueForKey:@"CollectionName"]];
                [entity setCollectionID:[[[myCollections objectAtIndex:i] objectAtIndex:j] valueForKey:@"CollectionID"]];
                [entity setManufacturer:[manufacturers objectAtIndex:i]];

                NSError *error;

                if (![managedObjectContext save:&error]) {
                    // Handle the error.
                    NSLog(@"%@",error);
                }
                importStatus.text =[NSString stringWithFormat:@"importing collection: %@", entity.CollectionName];
            }
}

In the code above the importStatus is the UILabel I need to update constantly, but it seems to wait until after everything in this method is completed.

  • 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-15T15:57:26+00:00Added an answer on May 15, 2026 at 3:57 pm

    You probably call importCollections from the main thread. This way you don’t give UIKit a chance to update the UI as long as you are blocking the main thread and don’t return to the run loop.

    You should do the lengthy computation or loading of resources on a background thread. Because you can only update UI elements from the main thread, you have to wrap your UIKit calls into performSelectorOnMainThread:withObject:waitUntilDone:.

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

Sidebar

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer We're using a style guide in the form of a… May 17, 2026 at 1:35 am
  • Editorial Team
    Editorial Team added an answer Check out mysql_insert_id() May 17, 2026 at 1:35 am
  • Editorial Team
    Editorial Team added an answer You can easily modify the ControlTemplate or style of controls… May 17, 2026 at 1:35 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have an app that runs on iPad and iPhone running iOS 3.2, but
I have an app that downloads a good amount of data to the iPad
I have an iPad app that I would like to make Universal, however this
I have an iPad app that is set to start in landscape mode. From
I have a split view controller-based iPad app that uses a Web View to
I am building an iPad app that loads local html files in a UIWebView.
I have an ipad app where I am seeing an image displaying briefly before
Convert iPad application to iPhone- Universal app. I already have one iPad application, now
I have an iPhone app that I would like to port over to the
I have converted an iPhone application using the wizard like thing in XCode into

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.