New to obj-c and cocoa, working a on a simple game as my first (mac os x) app. I have a menu view and a game view:
MenuView.h/m
MenuViewController.h/m
GameView.h/m
GameViewController.h/m
I want the menu to be displayed by default, and when the play button (which is in the MenuView) is clicked I want the menu to go away and the game to appear. I understand actions and outlets, but I don't know where to start on making the views swap themselves out. Any help? It seems like I would need to somehow make my MenuViewController talk to my MainController?
Peter Hosey,
If you are looking at the MenuViewController as a sort of "main" view controller, at the moment the play button is clicked, you could initialize an instance of GameViewController:
Of course, you need to import the "GameViewController.h" to access it.