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
}
}