应用程序中@property(非原子,保留)语句的用途是什么? [英] What is the use of @property (nonatomic, retain) statement in the application ?

查看:116
本文介绍了应用程序中@property(非原子,保留)语句的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ima初学者iphone开发者我想知道@property(非原子,保留)语句的用法有什么用例子,任何团体都可以给我任何答案吗?

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 ?

推荐答案

@property 告诉Objective-C生成此成员变量的getter和setter @synthesize 'd in实现类。 保留参数表示生成的setter应将保留消息传递给正在设置的参数。 非原子表示无法保证获取和设置变量的原子性。

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

这篇关于应用程序中@property(非原子,保留)语句的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆