i have trouble with calling one view controller to another view controller using segue function here is my code.
- (void)viewDidLoad{
[super viewDidLoad];
if (first == NULL) {
[self performSegueWithIdentifier:@"first" sender:self];
NSLog(@"viewDidLoad");
}
}
now i got output in console viewDidLoadbut i can’t able to call that Segue.
so i tested in IBaction method there its working fine
here is my IBaction method code.
-(IBAction)test{
[self performSegueWithIdentifier:@"first" sender:self];
}
kindly some one guide me how to call view controller in viewdidload method.
note:this is parent view controller viewdidload method i want to check this condition after splash screen.
I think -(void)viewDidLoad is too soon in the life cycle to perform a segue.
Try: