I'm trying to create a loading view that is displayed when code is being called. Right now when I call to add a subview it isn't added until the rest of the method has been run through. For example,
- (void)loadFight:(NSString*)levelName
{
[self createLoadingView];
sumoController = [[sumoViewController alloc] initWithNibName:@"sumoViewController" bundle:nil];
[window insertSubview:sumoController.view belowSubview:levelController.view];
[sumoController setUpLevel:@"school" stats:playerStats];
[levelController.view removeFromSuperview];
[self removeLoadingView];
[sumoController startMatch];
}
I've found that there is no point for me to call the createLoadingView method because it isn't shown until everything has been initialized and by then i remove it.