I am a beginner to iPhone development, I know the only very basic concepts of it. While I'm reading, I got a small question, what is the main difference between cocoa and cocoa touch?
Can anyone one please help?
Cocoa is for Mac OS X, Cocoa Touch for iOS. In Cocoa Touch, the UI classes all start with the prefix "UI" as in "UIButton", "UIView", etc. pp. while in Cocoa, the have the "NS" prefix as in "NSButton", "NSButton" (the NS stands for NextStep which is a predecessor to Mac OS X).
Cocoa has more features than Cocoa Touch. But overall their APIs are very similar (they are not the same, but you will likely find it easy to find your way in one API if you already know the other).
As told very well by DarkDust would like to add few more points.
The main difference between Cocoa and Cocoa touch is that the UI classes and APIs aren't the same as Mac OS X, so instead of NSTextField, you have UITextField.
Cocoa is the application framework for Mac OS X.
Cocoa Touch is the application framework for iPhone and iPod Touch - very similar to Cocoa.
Cocoa is commonly referred to as the combination of the Foundation and AppKit frameworks.
Cocoa Touch is the combination of the Foundation and UIKit frameworks
There are also some differences between the Foundation frameworks in Cocoa and Cocoa Touch, most commonly missing classes, eg, Cocoa has NSHost and Cocoa Touch does not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With