How to call a viewcontrolller Runtime

Asked

Viewed 56 times

0

Friends I just need to open a Viewcontroller , and I’m jerking off, could help. Who can help .... Thank you. .

LoginViewController *tela2 =
[self.storyboard instantiateViewControllerWithIdentifier:@"login"];
[self presentViewController:tela2 animated:YES completion:nil];

inserir a descrição da imagem aqui

  • Marcio, if you have already found the solution on your own, just answer the question, as you have already done, and mark it as accepted by clicking on V left-hand.

2 answers

1

With what you sent seems to be all right, the problem must be occurring by where you’re making this call, so.

If you’re calling this method inside:

override func viewDidLoad() {
    super.viewDidLoad()

}

Try running it within the following method:

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)

}

0

solved, just create a navigation controller.

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.