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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:20:59+00:00 2026-06-15T19:20:59+00:00

I am having an issue with an iPad app I am developing. I have

  • 0

I am having an issue with an iPad app I am developing. I have the following code:

CFTimeInterval startTime = CFAbsoluteTimeGetCurrent();

[self showSpinnerWithMessage:@"Loading settings..."]; // Shows a UIActivityIndicator on screen

dispatch_async(dispatch_get_global_queue(0, 0), ^
{
    //Updating items on screen here
    [label1 setText:@"Test1"];
    [label2 setText:@"Test3"];
    //...

    CFTimeInterval difference = CFAbsoluteTimeGetCurrent() - startTime;

    if (difference < MINIMUM_INDICATOR_SECONDS)
    {
        [NSThread sleepForTimeInterval:MINIMUM_INDICATOR_SECONDS - difference];
    }

    dispatch_async(dispatch_get_main_queue(), ^(void)
    {
        [self removeSpinner]; // Removes UIActivityIndicator from screen
    });
};

The problem is that sometimes the UI takes a while to update, and in these particular instances the spinner (UIActivityIndicator) goes away before the UI has actually updated. I realize this is because the items on screen do not actually update until the next run loop so my question is, how can make my [self removeSpinner] call wait until the UI has updated?

  • 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-15T19:21:00+00:00Added an answer on June 15, 2026 at 7:21 pm

    Try putting the UI-updating code in the block with removeSpinner.

    dispatch_async(dispatch_get_main_queue(), ^(void)
    {
        [label1 setText:@"Test1"];
        [label2 setText:@"Test3"];
        [self removeSpinner]; // Removes UIActivityIndicator from screen
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad app and I'm having an issue in my rootViewController .
I am having a really odd issue. I have a Phonegap 2.0 app that
I am having an issue regarding rotation of a pdf document in ipad. Have
I'm developing a web app, and having trouble with HTML5 video for iPad. This
Hi guys I am having issue I have this query: SELECT * FROM useraccount
i am having issue with loading my selector via a jquery ajax load call
Just started mongo and started having issue with querying already. i have a collection
Having an issue here that I have tried everything I can think of but
I am having an issue with Landscape mode in my iPad application. I created
The issue I am having with this naming convention ~iPad.xib is that everything loads

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.