应用程序中@property(非原子,保留)语句的用途是什么?

编程入门 行业动态 更新时间:2024-10-26 18:24:46
本文介绍了应用程序中@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(非原子,保留)语句的用途是什么?

本文发布于:2023-11-05 03:59:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1559831.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:原子   语句   应用程序   用途   property

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!