Swapping child views

On my Apps main page I would like to include an NSView and two NSButtons. I'd like to load different info in the NSView for a click on each button. I assume that I need to build a couple of views with nibs, but I just can't seem to get things hooked up and working. Could somebody please point me to a simple step by step to hook this up using Xcode 8 and objective c for Mac OS.


Thank you

Replies

Can you explain what you mean by : I'd like to load different info in the NSView for a click on each button.

What do you want to do precisely ? What type of info do you want to display ?


If for instance you want to change a label in the view, depending on the button clicked :

- create a label object in the view.

- connect to an IBOutlet

- In each button IBAction, set the label.stringValue to what you want.


If you want to change an image in a view, the IBOulet should be an ImageView