Change NSView of window programatically
Hi,
I have a toolbar with some buttons. The toolbar is placed in a window with a view controller.
I want to be able to switch from view if I push a button in the toolbar.
This is my code (with everything properly connected)
- (IBAction)Featured:(id)sender {
[self.MainWindow.contentViewaddSubview:FeaturedView];
}
The FeaturedView is connected to the right view controller, and MainWindow is connected to the uppperleft window.
This code doesn't work, can anybody help me please?
Xcode 6 (Newest version), mac os x
iMac, OS X Yosemite (10.10)