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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:47:07+00:00 2026-06-01T22:47:07+00:00

I am writing a splash screen. The splash screen would connect to the server

  • 0

I am writing a splash screen. The splash screen would connect to the server and receive some data. When the data has been received successfully, I want to programmatically go to the next viewcontrller. How can I achieve this? Its not the same as button click? Because I dont get forwarded to my next screen even when I put the code in my viewDidLoad of my LoadingViewContrller.

TableViewController *tvc = [[TableViewController alloc] init];
tvc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:tvc animated:NO];

I would like to jump to TableViewContrller automatically after all my data has been retrieved.

Below are my codes when I am retrieving data from the network.

- (void)fetchedData:(NSData *)responseData {
if(responseData == nil){
    [ErrorViewController showError];
}else{
 //methods to start parsing and adding json into array
if(delegate){
    [delegate jsonReceivedData:array]; 

//codes to go to next screen should be here
}
}
  • 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-01T22:47:08+00:00Added an answer on June 1, 2026 at 10:47 pm

    Okay, the way to do this is simple. Make the first screen for your app the same as the splash screen. Declare and instantiate an NSTimer, possibly in viewWillAppear, like so:

    mainTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateTime) userInfo:nil repeats:YES];
    

    Then instantiate a BOOL:

    - (void)fetchedData:(NSData *)responseData {
    if(responseData == nil){
        [ErrorViewController showError];
    }else{
     //methods to start parsing and adding json into array
    if(delegate){
        [delegate jsonReceivedData:array]; 
    
        myBool = YES;
    }
    }
    

    In the method accessed by your timer (in this case “updateTime”) do the following:

    -(void)updateTime{
        if(myBool){
            [mainTimer invalidate];
            MyViewController *vC = [[MyViewController alloc] init];
            //pass vC information, now that it has been initialized
            //or pass information to a singleton, from which vC can retrieve it
            // (I can show you how to do that, too, if need be)
            //I will assume you are using a navigationController
            [self.navigationController pushViewController:vC animated:YES];
        }
    }
    

    For the sake of space, I’m leaving out the declarations of mainTimer and myBool.

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

Sidebar

Related Questions

hello all i have my splash screen which i want to show in landscape
Writing a function to generate and push some random data inside of the unknown
I'm working on writing a splash screen that returns a game mode (int) and
I am now writing an app which needs some prepared data in the database,
I have been writing Node.js apps for quite some time now, and I have
Writing some docs with code snippets which I want to be copyable to run
Writing a stored procedure in MS SQL Server 2008 R2, I want to avoid
I would like to use a regular window for splash screen, so no PNG
Writing documentation in html requires some code examples. What to do with characters that
Writing a client application that sends images to a server via a webservice. As

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.