user407063
user407063

Reputation: 61

What is the use of @property (nonatomic, retain) statement in the application ?

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

Answers (2)

Alex Reynolds
Alex Reynolds

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

Damien
Damien

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

Related Questions