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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:51:00+00:00 2026-05-13T07:51:00+00:00

I have implemented a UIActivityIndicator that shows up in one part of my program

  • 0

I have implemented a UIActivityIndicator that shows up in one part of my program but not another. I have the activity indicator come up while i am loading a table, however, i am trying to get it to start animating again after the user has clicked a button and is waiting for the table to reload. The table reloads, but no indicator. Here is the code.

- (void)viewWillAppear:(BOOL)animated {
    CGRect frame = CGRectMake (120.0, 185.0, 80, 80);
    activity = [[UIActivityIndicatorView alloc] initWithFrame: frame];
    activity.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
    [activity startAnimating];

    [navigationUpdateFromDetail.window addSubview: activity];

    [super viewWillAppear:animated];
}

It comes up for that part. However, for the next part it does not want to seem to come up.

- (IBAction) btnGreaterTen_clicked :(id)sender {

    self.searchDistance = [NSNumber numberWithDouble : 10];

    CGRect frame = CGRectMake (120.0, 185.0, 80, 80);

    activity = [[UIActivityIndicatorView alloc] initWithFrame: frame];
    activity.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;

    [navigationUpdateFromDetail.window addSubview: activity];
    [activity startAnimating];


    NSLog(@" search value after change %@", [searchDistance description]);

    [self getSetDisplay];

    [activity stopAnimating];
}

That button changes a variable and is suppose to start the animation, but it does not. I have changed the color to make sure it was not just blending in, so that is not the solution. I tried to recreate the same object, but still no luck.
Thank you in advance.

  • 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-13T07:51:00+00:00Added an answer on May 13, 2026 at 7:51 am

    That won’t work, because the animation will only show when the main application loop is “running”. In your code, you’re blocking the main thread by calling [self getSetDisplay].

    You should load your data asynchronously to make this work (in a background thread). Then you can call startAnimating, start your thread, and when the thread finishes, stop the animation.

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

Sidebar

Related Questions

We have implemented a drag and drop feature that shows a nice simple representation
i have implemented galleryview in one screen named display_image.xml in which i have shown
I have implemented a simple appmod that handle WebSockets and echo back the messages.
I have implemented the jquery thick box in my page to show another page
I have implemented a selection pattern similar to the one described in this post
I have implemented my MVVM error message as a message dialog that subscribes to
I have implemented a WCF service that exposes operations that a Windows Forms client
I have implemented a generator-based scanner in Python that tokenizes a string into tuples
I have implemented a multi-threaded program which involves spawning a thread for each user,and
I have implemented authentication systems for webapps several times over the years, but before

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.