@property (attributes) 迷惑的attributes
来源:互联网 发布:如何对付淘宝无良卖家 编辑:程序博客网 时间:2024/05/17 01:12
@property是一个属性访问声明,扩号内支持以下几个属性:
1,getter=getterName,setter=setterName,设置setter与getter的方法名
2,readwrite,readonly,设置可供访问级别
2,assign,setter方法直接赋值,不进行任何retain操作,为了解决原类型与环循引用问题
3,retain,setter方法对参数进行release旧值再retain新值,所有实现都是这个顺序(CC上有相关资料)
4,copy,setter方法进行Copy操作,与retain处理流程一样,先旧值release,再Copy出新的对象,retainCount为1。这是为了减少对上下文的依赖而引入的机制。
5,nonatomic,非原子性访问,不加同步,多线程并发访问会提高性能。注意,如果不加此属性,则默认是两个访问方法都为原子型事务访问。锁被加到所属对象实例级(我是这么理解的...)。
@synthesize xxx; 来实现实际代码
http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html
- @property (attributes) 迷惑的attributes
- Property attributes
- Attributes
- Attributes
- $$Attributes
- @property attributes 比较
- Property Declaration Attributes
- Reading Property Attributes
- NUnit的常用Attributes
- label的attributes相关
- Attributes的使用
- Attributes的NSDctionary设置
- 我的特性Attributes
- jquery中.prop()和.attr()的区别 什么叫布尔型属性 property vs attributes , boolean attributes...
- Variable property attributes or Modifiers in iOS
- Variable property attributes or Modifiers in iOS
- Variable property attributes or Modifiers in iOS
- Python 的 class attributes 和 instance attributes 的区别
- 应用HTML5须知五则
- OnCtlColor 使用问题
- 从今起多写博客
- Java中JSON解析器的一点见解
- matlab 调出颜色版自选颜色
- @property (attributes) 迷惑的attributes
- C# Asp.Net MVC 3 项目实现控制器(controller)与页面(view)分项目管理
- Android成长之路-Button、ImageButton、ToggleButton按钮的功能和用法
- 通用希腊字母读法
- wpf 属性变更通知类的实现
- ANDROID源码编译开发总结
- 字符串转换成python中exec能执行的函数
- NDK-ubuntu 环境变量设置
- ObservableCollection