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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:23:23+00:00 2026-05-30T01:23:23+00:00

I have an imaged name Default.png. This will load when the application is launching.

  • 0

I have an imaged name Default.png. This will load when the application is launching. Now i need to add an activity indicator to it. So it will spin and make the app look nice.

We know that we can’t add any UI Components when the app is loading. So i thought to add the UIActivityIndicator in the didFinishLaunchingWithOptions method in the App delegate.

These are the steps i followed.
i added a view
added the default.png
added activity indicator

then

[window addSubView:view];

But nothing hapence.

Help how to write the code for this ?

  • 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-30T01:23:25+00:00Added an answer on May 30, 2026 at 1:23 am

    You’re on the right track, but you do need to add another UIView to your window (not another UIViewContoller, necessarily) temporarily. I do this sort of thing often. Here’s some code that would be appropriate for your applicationDidFinishLaunching:withOptions: method:

    [window makeKeyAndVisible]
    ...
    
    // Create and show an overlay view with a spinner
    UIImage *defaultImage = [UIImage imageNamed:@"Default.png"];
    UIImageView *imageView = [[UIImageView alloc] initWithImage:defaultImage];
    UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc]
                initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
    // Position the spinner appropriately for our splash image so it's not obscured
    CGRect frame = spinner.frame;
    frame.origin.x = imageView.frame.size.width / 2 - frame.size.width / 2;
    frame.origin.y = imageView.frame.size.height / 5 * 4 - frame.size.height / 2;
    spinner.frame = frame;
    [spinner startAnimating];
    [spinner setHidesWhenStopped:YES];
    
    startupView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
    [startupView addSubview:imageView];
    [imageView release];
    [startupView addSubview:spinner];
    [spinner release];
    [window addSubview:startupView];
    

    The ivar startupView belongs to the app delegate, and later in the startup sequence another method removes it gracefully by fading it from view:

    UIActivityIndicatorView *spinner = [[startupView subviews] lastObject];
    [spinner stopAnimating];
    [UIView animateWithDuration:1.0
                          delay:0
                        options:UIViewAnimationOptionCurveLinear
                     animations:^(void) {
                         startupView.alpha = 0.0;
                     } completion:^(BOOL finished) {
                         [startupView removeFromSuperview];
                         [startupView release];
                     }];
    

    It’s worth mentioning that splash screens like this are not the “recommended” startup screen in Apple’s view. But they do not seem to reject apps that have them.

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

Sidebar

Related Questions

I need to download images from a website, and I have the login name
Need to use own imaged markers instead built-in pins. I have several questions. 1.
hey, well I have this form <form method=POST action=''> <input type=hidden name=op value=download1> <input
so I have this form where I add item to my DB. Fiedls are:
I have a collection of objects which describe an image-name, its size and it's
Suppose I have string Name and Image Photo as properties of a class in
I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png . The Web server (nginx) is configured
I have this SQL query: SELECT * FROM IMAGES WHERE IMAGENAME in ('IMG1', 'IMG2',
I have image and txt file of same size say 200 KB. Now i
So I have Image like this (source: de-viz.ru ) I want to get something

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.