开发者

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

i m a beginner iphone developer an开发者_JS百科d i want to know about what is the use of @property (nonatomic, retain) statement with example , any body can give me any answer ?


@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.


Apple has a lot of examples in the Declared Properties section of their Objective-C Programming Language guide. Definitely worth reading through.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜