In regards to iPhone development, how do you now when your using a Cocoa vs pure Objective-C objects. For example, the following are Objective-C:
- NSTimer
- NSString
- int, float
- NSMutableArray
But these are Cocoa:
- UILabel
- UIColor(?)
- UIView
And to be clear, does
Cocoa Touch == iPhone development
Cocoa == Mac OS X development
You’ve got it a little wrong.
NSTimer, NSString, NSMutableArray are all Cocoa.
intandfloatare actually C, but since Objective-C is a strict superset of C, you are able to use them in your Objective-C code.Pure Objective-C requires linking only to the Objective-C runtime library and no other frameworks or libraries. Cocoa is a framework that includes things like NSObject and NSString. Other frameworks, like AppKit, extend the Cocoa framework.
Coding in pure Objective-C usually means deriving from the root object called
Objectand not NSObject. Things like@implementation,@interface,@selectoretc. are the Objective-C extensions to C and these are what are common in all Objective-C source, pure or not. If you want to code in pure Objective-C you cannot use anything other than your own objects derived fromObject.