0

I make test app that show second view when the init view is shown. My code is this:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    [self performSegueWithIdentifier:@"showSecondView" sender:self];
}

But second view is not shown. Can someone help me. Thanks a lot

nyanev
  • 11,299
  • 6
  • 47
  • 76

2 Answers2

1

Move it to viewDidAppear. Won't perform segue until it shows up.

Justin Paulson
  • 4,388
  • 1
  • 23
  • 28
-1

If you want to know the reason it didn't work for you in viewDidLoad, you can look at my answer here

Community
  • 1
  • 1
EladWeinson
  • 189
  • 3
  • 9