mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-20 05:21:26 +02:00
Add more description to @property getters and setters.
This commit is contained in:
@@ -233,6 +233,9 @@ int main (int argc, const char * argv[])
|
|||||||
@property int count;
|
@property int count;
|
||||||
@property (copy) NSString *name; // Copy the object during assignment.
|
@property (copy) NSString *name; // Copy the object during assignment.
|
||||||
@property (readonly) id data; // Declare only a getter method.
|
@property (readonly) id data; // Declare only a getter method.
|
||||||
|
// To access variable in implementation file, use '_' followed by variable name:
|
||||||
|
_count = 5;
|
||||||
|
NSLog("%@", _count); // => prints 5 to console
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
+/- (return type)methodSignature:(Parameter Type *)parameterName;
|
+/- (return type)methodSignature:(Parameter Type *)parameterName;
|
||||||
|
Reference in New Issue
Block a user