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

The Archive Base Latest Questions

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

i have a tabbar application. here is my code – (void)applicationDidFinishLaunching:(UIApplication *)application { [application

  • 0

i have a tabbar application. here is my code

- (void)applicationDidFinishLaunching:(UIApplication *)application {
[application setStatusBarHidden:YES animated:NO];
[self showSplashView];
}
- (void)showSplashView {
//If i don't use black view it displays white screen thats look so bad...
   UIView* blackView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
blackView.backgroundColor = [UIColor blackColor];
[window addSubview:blackView]; // sends [blackView retain]
[blackView release];

splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
    splashView.image = [UIImage imageNamed:@"MyImage.png"];
    [window addSubview:splashView];
    [window bringSubviewToFront:splashView];
    [UIView beginAnimations:nil context:nil ];
[UIView setAnimationDelay:5.0];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
   [UIView setAnimationDelegate:self];
   [UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:) ];
   splashView.alpha = 0.0;
   splashView.frame = CGRectMake(-60, -60, 440, 600);

   [UIView commitAnimations];

  }
  - (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
UIView* blackView = [[window subviews] objectAtIndex:0];
    [blackView removeFromSuperview];
    [splashView removeFromSuperview];
    [splashView release];
[window addSubview:tabBarController.view];
[window makeKeyWindow];
 }

so my problem is when my application starts first it displays black screen ,after few second it displays my splash image. when splash screen animation finishes again it displays black screen and after few second it displays my view controller.i dont know why it happens.i hope my question is clear.
thanks
EDIT
My expected behavior is as soon as app start it should display my splash screen instead black screen and as soon as splash animation finish it should display my first view controller(which is table view controller with in first tabbar)..

EDIT 2 :
is it something time consuming in this code
[window addSubview:tabBarController.view];
how do i do this process in background while my splash screen is running.

  • 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-13T19:30:18+00:00Added an answer on May 13, 2026 at 7:30 pm

    The first black screen is because you set the animation delay to 5 seconds. Instead of doing that, why don’t you spend the time preparing the first view controller, then display the splash animation. Then you can transition to the view controller once the animation is done.

    Also, you should have a Default.png that resembles your first screen. Then you wouldn’t need to worry about that blackView. If you’re really intent on this splash animation stuff, you should make Default.png look like the first frame of the animation.

    However, I highly recommend you check out Apple’s HIG document. You’re really not conforming to best practices here.

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

Sidebar

Ask A Question

Stats

  • Questions 310k
  • Answers 310k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer While I have no explicit CVS knowledge I would suggest… May 13, 2026 at 10:15 pm
  • Editorial Team
    Editorial Team added an answer The file recording those XML settings is: <workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.wst.xml.core.prefs That is:… May 13, 2026 at 10:15 pm
  • Editorial Team
    Editorial Team added an answer Not sure if I read this right, but how about… May 13, 2026 at 10:15 pm

Related Questions

I'm following a tutorial on how to use Interface Builder from Chapter 2 of
Here is my problem: I've read a lot about how to use a tab
I have a question about iPhone app design approach... I have in mind to
OK so having a real headache with this one and most of the day
I have an application that perfectly works on iPhone os 2.2.1 but when I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.