1

I intend to do something similar to YouTube's interface which has a side menu displayed when the menu button is pressed, and change the view controller when a different page is pressed.

I have all of my view controllers created in Storyboard but I can't find a way to access those. When I use instance:

[mainStoryboard instantiateViewControllerWithIdentifier:@"MenuController"]

it creates a new MenuController instead of the one that is presented from the Storyboard. I would like to use the existing one. Is there a way to do that or do I have to initialize and setup everything programmatically at startup?

4

1 回答 1

0

目前还不清楚您要做什么。您正在询问如何访问由情节提要创建的视图控制器,但看起来您已经知道如何做到这一点。如果您想访问之前在应用程序生命周期中创建的 MenuController,您可以将其保存在一个属性中,例如可能在 AppDelegate 中,以便您可以在需要时检索它

于 2013-08-07T07:50:32.690 回答