Question

i am new to ios development i have created a slash screen that check internet connection when application load and that is my rootviewcontroller. i have created a next view using uiviewcontroller in same storyboard name Main_iphone the storyboard id of viewcontroller is "HomeScreen".

the question is how do i jump on "Homescreen" from "SplashScreen" when internet connection found

I had created the function to jump on next screen-

[self perform:@selector(goToNextView) withObject:nil afterDelay:3];
-(void) goToNextView{
   UIStroyboard *iphone=[UIStoryBoardWithName:@"Main_iphone" bundel: nil];
}

Thank you for your time

Was it helpful?

Solution

Try this :

-(void) goToNextView{

[self performSegueWithIdentifier:@"HomeScreen" sender:self];

}

If, you want to set some value use this :

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
   if ([[segue identifier] isEqualToString:@"HomeScreen"]) 
    {
            // do here
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top