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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:15:44+00:00 2026-06-17T10:15:44+00:00

I am getting an different image at the start of the app like a

  • 0

I am getting an different image at the start of the app like a splash screen then i am getting my actual image that i placed in coding.
I placed the splash screen with the following code in my didFinishLaunchingWithOptions:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{    
    
    self.window.rootViewController = self.tabBarController;
    self.tabBarController.delegate=self;
    [window addSubview:tabBarController.view];
    [self.window makeKeyAndVisible];

    LoginViewController *vc = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
    self.loginNav = [[UINavigationController alloc] initWithRootViewController:vc];
    
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    if([userDefaults valueForKey:@"UserName"] &&[userDefaults valueForKey:@"Password"])
    {
        vc.username=[userDefaults valueForKey:@"UserName"];
        vc.password=[userDefaults valueForKey:@"Password"];
        vc.autoLogin=YES;
        [vc loginSelectorMethod];
    }
    
    else
    {
        [self.window addSubview:self.loginNav.view];
        [self.window makeKeyAndVisible];
    }
    
    splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
    splashView.image = [UIImage imageNamed:@"splashscreen.png"];
    [window addSubview:splashView];
    [window bringSubviewToFront:splashView];
    [self performSelector:@selector(removeSplash) withObject:nil afterDelay:3.0]; 
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
    NSLog(@"Registering for remote notifications"); 
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
    
    return YES;
}

Before the splash screen appears , the "Arrow.png" image appears then my splash screen appers.
If i delete the "Arrow.png" then in place of that image another images appears i.e., "aboutus.png" like that it continues.

I searched in my project for the "Arrow.png" it only appears once in my whole project in the coding.

  • 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-06-17T10:15:46+00:00Added an answer on June 17, 2026 at 10:15 am

    here you add subiview as a tabbar like bellow..

    [window addSubview:tabBarController.view];
    

    after you add loginview like bellow..

    [self.window addSubview:self.loginNav.view];
    

    and after that you add splashscreen like bellow..

        splashView.image = [UIImage imageNamed:@"splashscreen.png"];
        [window addSubview:splashView];
    

    So this is the problem that you seen more then screen instead of splashscreen.

    use bellow code…

       - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
    {   
       splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
        splashView.image = [UIImage imageNamed:@"splashscreen.png"];
        [window addSubview:splashView];
        [window bringSubviewToFront:splashView];
        [self performSelector:@selector(removeSplash) withObject:nil afterDelay:3.0]; 
        [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
        NSLog(@"Registering for remote notifications"); 
        [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
    
        return YES;
    }
    

    and in removeSplash method add this view as a subview of window like bellow..

    -(void)removeSplash{
    [splashView removeFromSuperView];
    LoginViewController *vc = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
        self.loginNav = [[UINavigationController alloc] initWithRootViewController:vc];
    
        NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
        if([userDefaults valueForKey:@"UserName"] &&[userDefaults valueForKey:@"Password"])
        {
            vc.username=[userDefaults valueForKey:@"UserName"];
            vc.password=[userDefaults valueForKey:@"Password"];
            vc.autoLogin=YES;
            [vc loginSelectorMethod];
        }
    
        else
        {
            [self.window addSubview:self.loginNav.view];
            [self.window makeKeyAndVisible];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following code why am I getting different values for a and b
I am getting following error in different places like when I am removing an
In the following code, I have determined that everything works, up until [tableView reloadData]
I'm working with an image caching system that generates different images based on a
I use the following code to getting images from the sprite. And it works
I am getting the following crash when I run the app on my device,
I have some input boxes that are getting different results from different browsers. Here
I'm getting this error: Cannot use a DependencyObject that belongs to a different thread
I am getting image file with QFileDialog. Image can be in different standard image
I'm getting a different behavior than my expectation (and also different than Microsoft C++).

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.