Cocoa – What are the main differences between Cocoa and CocoaTouch

cocoacocoa-touch

I am currently learning Objective-C and Cocoa. Next, I want to stick up to iPhone programming. I'll get a book for that, of course. But I would like to know now already, what the main differences are between Cocoa and Cocoa Touch.

Best Answer

The core concepts of Cocoa and Cocoa touch are similar, in that there is a view hierarchy and responder chain. However, the UIView architecture is much more closely tied to the more recent technologies such as CoreAnimation.

The types of controls that are available also change.

Additionally, Cocoa touch introduces the concept of UIViewControllers, which create a nice abstraction for putting code that interacts with your main program and the specific view it owns. As Chuck pointed out in the comments, this was added in Cocoa in Mac OS X 10.5, so depending on how you learned Cocoa you may or may not be aware of them.

Finally, as others have mentioned, Garbage Collection does not exist on the iPhone currently.