美文网首页
property各属性修饰符的作用

property各属性修饰符的作用

作者: CHADHEA | 来源:发表于2016-04-23 15:36 被阅读0次

1、setter = setterName:  get = getName 设置setter和getter的方法名

2、readwrite、readonly设置可供访问级别

3、assign 修饰九大基本类型、结构体类型、id类型以解决循环引用

4、copy修饰字符串类型,会使引用计数增加

5、retain修饰对象类型,会使引用计数增加

6、strong :ARC中修饰对象类型,相当于MRC中的retain

7、weak  :ARC中使用,相当于MRC中的assign

相关文章

网友评论

      本文标题:property各属性修饰符的作用

      本文链接:https://www.haomeiwen.com/subject/vqaxrttx.html