I have one view controller for my home screen and on for my game. When i go to the game from the home screen the game starts automatically but it lags whilst it loads the view controller. Is there any way to add a loading screen or something similar so it can load the view controller before it starts the game.
Writing code in viewDidLoad will lag the controller, so you can make trick, give some delay while controller will be loaded, then start your initialization, here is sample code for achieving the result you want
- (void)viewDidLoad
{
[super viewDidLoad];
// Show spinners/ progress here
.....
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// your initialization code
.....
});
}