Reputation: 61
i m a beginner iphone developer and i want to know about what is the use of @property (nonatomic, retain) statement with example , any body can give me any answer ?
Upvotes: 6
Views: 10000
Reputation: 96947
Apple has a lot of examples in the Declared Properties section of their Objective-C Programming Language guide. Definitely worth reading through.
Upvotes: 5
Reputation: 454
@property tells Objective-C to generate the getters and setters for this member variable when it is @synthesize'd in the implementation class. The retain parameter says that the generated setter should pass the retain message to the parameter being set. nonatomic means that atomicity of getting and setting the variable is not guaranteed.
Upvotes: 12