Vital
Vital

Reputation: 91

Switching between ViewControllers?

I have a NavigationController based app with multiple ViewControllers. How do I access ViewControllerB directly from ViewControllerA and display it?

Should be possible, no?

Thanks!

Translation: Regexident


Hallo!

Ich habe eine auf dem NavigationController basierte App mit mehreren ViewControllern. Wie kann ich direkt aus dem ViewControllerA den ViewControllerB aufrufen und anezigen lassen? Sollte doch irgendwie gehen, oder?

Danke!

Edit: Please write in english, when posting to StackOverflow! - Regexident

Upvotes: 0

Views: 194

Answers (1)

papr
papr

Reputation: 4777

Ok. You are in ViewController A. It is displayed by your navigation controller. Now the only thing you need is a reference to Viewcontroller B.

[viewControllerA.navigationController pushViewController:viewControllerB animated:YES];

Upvotes: 1

Related Questions