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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:21:05+00:00 2026-06-14T05:21:05+00:00

So we are making a game that has a normal UIView title screen, and

  • 0

So we are making a game that has a normal UIView title screen, and when the user presses the “Start Game” button, we attempt to put up the loading screen, remove the title view, we initialize the game view and add it to the superview (window in our case) underneath the loading screen.

Unfortunately, the end result is that the UI is blocked for a few seconds upon touching the “Start Game” button, and our loading screen blips on the screen for a millisecond before being kicked off for the loaded game view. We even added logging, and the logging messages appear in console while the UI is blocked.

Here is the method in question:

-(void)switchToGame{
    NSLog(@"adding loading");
    loadingScreen = [[UIImageView alloc] initWithImage:
                 [UIImage imageNamed:@"loading_screen.jpg"]];
    [self.window addSubview:loadingScreen];

NSLog(@"removing titlescreen");
[titleView.view removeFromSuperview];
self.titleView = nil;

if(self.gameView == nil){

    gmViewController *g = [[gmViewController alloc] 
                                 initWithNibName:@"gmViewController"
                                          bundle:nil];
    self.gameView = g;
    [gameView setIsLoading:YES];
    self.gameView.parent = self;
    [g release];
}



NSLog(@"inserting gameview");
[self.window insertSubview:gameView.view belowSubview:loadingScreen];
[self.window setRootViewController:gameView];
[self setGameIsActive:YES];
[gameView startAnimation];

//remove the loading screen
NSLog(@"killing loading");
[loadingScreen removeFromSuperview];
[loadingScreen release];
[gameView setIsLoading:NO];

}
  • 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-14T05:21:06+00:00Added an answer on June 14, 2026 at 5:21 am

    Forgot about this question.

    We solved it by moving the loading screen add to it’s own function:

    - (void)addLoadingScreen
    {
        loadingScreen = [[UIImageView alloc] initWithImage:
                     [UIImage imageNamed:@"loading_screen.jpg"]];
        [self.window addSubview:loadingScreen];
    }
    

    And then executing it on its own thread:

    [NSThread detachNewThreadSelector:@selector(addLoadingScreen)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a game that has its own level editor. The editor simply
I'm making a multiplayer flash game that has a lot of graphics/code. I'm having
Let's say I'm making an Use Case for a game that has a scoring
I am making a game that has a table (attack bonuses). What is the
I'm making a game that has a few levels that are available as in-app
I am making a game that has a win state and a lose state.
I'm making a game that involves a 4*4 grid. The user enters letters and
I am making a game that has several classes and each one do some
I am making a game which has to load all bitmaps at start because
I am making a java game that has a sidebar that displays a player's

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.