Private Public Protected access modifiers are present in Objective C ideone.com/3em2D
The following program demonstrates constructor, reference counting etc., ideone.com/Oad7A
Here is an e.g. of property and using @synthesize ideone.com/GmqHM ignore errors though
ideone.com/NsuFP is a complete example comprising of an interface implementation, allocate, initialize,method invocation
[obj morebar: 250] is how you would invoke a method morebar which takes a parameter int on the object obj.
customer.name = @"ACME Corporation"; output = customer.name; is how you invoke the setters and getters
All instance variables are private in Objective-C by default, write getters and setters Use @synthesize directive to autogenerate these
otierney.net/objective-c.htm… is a good reference for objective c
All Objective-C object variables are pointers types. The id type is predefined as a pointer types, sort of like your void *
- before a method name means it's an instance method. + before a method name means it's a class method.
The implementation of these methods is stored in <classname.m> e.g., foo.m. You could define methods in foo.m but is considered unsupported
The class interface is usually stored in a file <classname.h> for instance, foo.h and defines instance variables and public methods
