Question

Hi I'm new to Cocoa but I have some experiences with iOS (Cocoa Touch). In iOS (Cocoa Touch) mostly every view had its own view controller and the AppDelegate was basically unused. Is this this the same in Cocoa or am I putting all my code (IBActions, Outlets, ext) in the AppDelegate?

Secondly bindings. Are they a way of omitting the Controller classes and just binding the view objects directly to the Object class in GUI.

Thank you in advance.

Was it helpful?

Solution

Yes , Each Cocoa view should have a view controller just like in iOS but the main difference would be in iOS, it's a single window and it encapsulates multiple views. However on mac it would possible to design multiple windows with each having multiple view controllers.

The other difference would be, do not expect methods such as ViewDidLoad, ViewDidAppear etc. in cocoa and you won't get container controllers like UITabBarController , UINavigationController which would help with you with the flow of the navigation, you would have to do it using addSubview: methods.

For the bindings it is not recommended , the following article explains it very well.

http://www.informit.com/articles/article.aspx?p=1397564

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top