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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:39:45+00:00 2026-06-06T04:39:45+00:00

I have a simple catalogue app that lets users download product data from an

  • 0

I have a simple catalogue app that lets users download product data from an admin website.

The following code is triggered when the user presses the button to initiate a download

- (IBAction)downloadProducts:(id)sender {
    outputText.text = @"Downloading data, please wait...";
    [Product loadData:outputText];
    outputText.text = @"Ok, download complete.";
}

outputText is a UITextView that is supposed to let the user know what’s going on.

There is a static method in the Product class that handles the download. This all works ok, the only problem is that the output to the uitextview blocks until the download is complete.

ie. the “Downloading data, please wait…” message is not displayed until after [Product loadData: outputText]; completes and is instantly overwriting with the download complete message…

Any help much appreciated,

Thanks

jim

  • 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-06T04:39:48+00:00Added an answer on June 6, 2026 at 4:39 am

    Yes, updating the UI will be blocked during your download request. You might need to wait before calling [Product loadData:outputText], which can be done using

    [self performSelector:@selector(someMethod:) withObject:nil afterDelay:1.0]; 
    

    and put

    [Product loadData:outputText];
    outputText.text = @"Ok, download complete.";
    

    in that method.

    Or for best practices, start your download on a different thread or using a block. This allows you to keep updating the UI during the download (note that updating the UI should only be done in the main thread/queue)

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

Sidebar

Related Questions

In /app/design/frontend/default/[theme]/template/catalog/product/list.phtml you have the following snippet that loops through and displays the $_productCollection
I have a catalogue application in iOS 5 that is downloading data from XML
I have simple html code that plays YouTube video after click on the image:
I have simple shared memory DLL for interprocess data exchange from unmanaged to managed
Users on my web app generate about 100k search requests per day (product catalogue),
I have a rails app that uses the following, rails 3.1, ruby 1.9.2, mysql,
i have simple form that uploads image to server and returns php string containing
I am running a simple test app that opens an OLEDB connection, retrieves a
I have a simple JQuery Product list. When a user click an item, it
I have written a simple Magento plugin that simply lists all sub categories that

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.