Jeff
Jeff

Reputation: 14279

Controllers for switching from one view to another

Lets say I have an instance of ViewA on window. ViewA has a button on it. When the button is pressed, I want to hide ViewA and show ViewB. What kind of controller(s) would be involved with this? Is there a controller for the view and the window? If so, who handles the event?

Note: This is for OS/X, not iOS.

Upvotes: 0

Views: 98

Answers (1)

timquinn
timquinn

Reputation: 446

Here is a sample project that demonstrates use of NSViewController:

https://developer.apple.com/library/mac/#samplecode/ViewController/Introduction/Intro.html

Perhaps it will help you to search more effectively by giving you the right terms to use.

Upvotes: 2

Related Questions