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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:12:18+00:00 2026-05-13T14:12:18+00:00

I am trying to manage the activity indicator from my App Delegate, that way

  • 0

I am trying to manage the activity indicator from my App Delegate, that way any of my views can put the indicator up. So, I am adding it as a subview to ‘window’ and start/stop as follows:

- (void)didStartActivity
{
    if( activityIndicator == nil ) {
        activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        activityIndicator.hidesWhenStopped = YES;
        activityIndicator.center = window.center;
        activityIndicator.transform = CGAffineTransformScale(CGAffineTransformIdentity, 6.0, 6.0);
    }
    NSLog(@"%s: starting the activityIndicator", __FUNCTION__);
    [window addSubview:activityIndicator];
    [activityIndicator startAnimating];
}

I see the log messages, so I know the code is being invoked. The indicator is at the center and 6x the default size. However, the stopAnimating isn’t stopping. The only thing I can conclude is that it needs to run in the present view controller.

- (void)didStopActivity
{
    NSLog(@"%s: stopping the activityIndicator", __FUNCTION__);
    [activityIndicator stopAnimating];
    [activityIndicator removeFromSuperview];
}
  • 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-13T14:12:18+00:00Added an answer on May 13, 2026 at 2:12 pm

    OK. I did my experiment and sure enough, it worked flawlessly when I added the activity indicator as a subview of viewcontroller’s view. However, when I then used that new simpleton project to try it as a subview to window it also worked. Obviously a bug in my code and it needs more inspection.

    I will award both Eimantas with the answer as the debug notion was helpful in my solution.

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

Sidebar

Related Questions

I'm trying to write an app that consists of an activity that manages a
I've been trying to work out the 'best practices' way to manage file uploads
I'm trying to call JDIC from my application, but I can't get it to
I'm new on Android developing. I'm trying to manage gps location between activity. In
I'm trying to bind a customer ContentProvider to my activity that holds a GridView
I am trying to manage session of users after authentication with ldap. The authentication
I'm trying to manually manage some geometry (spatial) columns in a rails model. When
I am trying to work out how to manage the following relationships A Store
I'm trying to figure out how to manage my event ids. Up to this
I'm trying to get Django's manage.py to run with modified settings files. I have

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.