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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:35:22+00:00 2026-05-29T03:35:22+00:00

I download certain data, and when it’s downloaded this method is called: – (void)connectionDidFinishLoading:(NSURLConnection

  • 0

I download certain data, and when it’s downloaded this method is called:

- (void)connectionDidFinishLoading:(NSURLConnection *)connection;

In this method I should present a rotating image in the view controller which I do with delegateing and when the data is downloaded I remove this roatating image:

- (void)connectionDidFinishLoading:(NSURLConnection *)connection {

[delegate showIndicator];

//Complex data downloading

[delegate hideIndicator];
}

So those method are called when the connectionFinishedLoading happen, but they are not called. Here are their implementations:

-(void)showIndicator;
{
    NSLog(@"Show indicator");
    UIImage *statusImage = [UIImage imageNamed:@"update.png"];
    activityImageView = [[UIImageView alloc] initWithImage:statusImage];
    // Make a little bit of the superView show through

    activityImageView.animationImages = [NSArray arrayWithObjects:
                                         [UIImage imageNamed:@"update.png"],
                                         [UIImage imageNamed:@"update2.png"],
                                         [UIImage imageNamed:@"update3.png"],
                                         [UIImage imageNamed:@"update4.png"],
                                         nil];
    activityImageView.frame=CGRectMake(13, 292, 43, 44);
    activityImageView.animationDuration = 1.0f;
    [rightView addSubview:activityImageView];
    [activityImageView startAnimating];
}
-(void)hideIndicator
{  NSLog(@"Hide indicator");
     [activityImageView removeFromSuperview];
}

And that’s where I create JManager object for which connectionFinished event is called:

-(IBAction)update:(id)sender
{
///la la la updating
JManager *manager1=[[JManager alloc] initWithDate:dateString andCategory:@"projects"];
            manager1.delegate=self;
            [manager1 requestProjects];
}

Why can’t my custom indicator adding can’t be done on the behalf of Jmanager object? thanks!

  • 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-29T03:35:23+00:00Added an answer on May 29, 2026 at 3:35 am

    Assuming you are calling your NSURLConnection from the main thread, the method is not executed asynchronously, so the indicator has no opportunity to be displayed between you starting and stopping it.

    - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
    
        [delegate showIndicator];
    
        //Complex data downloading
    
        [delegate hideIndicator];
    }
    

    You should call the [delegate showIndicator] in your - (void)connectionDidReceiveResponse method instead, like this:

    - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
    {
        //connection starts
        [delegate showIndicator];
    }
    
    - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
    
        //connection ends
        [delegate hideIndicator];
    }    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a cron job to check email accounts and download certain attachments. This
I need to periodically download, extract and save the contents of http://data.dot.state.mn.us/dds/det_sample.xml.gz to disk.
I want to download this open source application, and they are using Git. What
Where I can download sample database which can be used for data warehouse creation?
I need to be able to directly download certain YouTube videos using PHP. Based
I have an input XML document something like this: <text> <p> Download the software
When i call download data on my webclient, the response is different to when
How does one write to a file after a certain amount of data is
I need to login into a certain website before I can attempt a data
I'm looking for a flexible data visualization / reporting tool for my download site.

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.