Can anyone link to or list out the object types that the iphone sdk has built in? For the moment I’m just looking for the simple data types. I’m looking for variable types that are accepted in @interface definitions and also can be made into properties.
For example: NSNumber is for integers, right? BOOL is for booleans.
What are the rest of the simple data types I can use?
I would like to answer the question about what can go into a
@interfaceand a@propertydefinition.Short answer; any C type, plus some Objective-C additions:
SEL & IMP– Method selectors, and method implementation pointer.id– The object instance pointer.Class&Protocol– The meta class, and protocol instance pointers.These have special meaning, anything else is just a sub-type of these.
For the access modifiers to
@property:assign– Any type.retain– Only anidtype, conforming to theNSObjectprotocol.copy– Only anidtype, conforming to theNSCopyingprotocol.