小爷的爷

2016年7月1日

copy和assign的使用和区别

摘要: 1、使用copy和assign都可以进行修饰属性或者变量。 2、区别: (1)copy的使用:使用这个进行修饰的属性,当已经进行初始化之后,就无法再改变属性的数据。 如: @property (copy , nonatomic) NSString *firstName;//是Person类的一个属性 阅读全文

posted @ 2016-07-01 12:45 小爷的爷 阅读(722) 评论(0) 推荐(0) 编辑
不能使用weak修饰进行声明的类

摘要: These classes include NSTextView, NSFont and NSColorSpace; for the full list, see Transitioning to ARC Release Notes. 但是如果你真的想在这些类中使用weak进行修饰,可以使用不安全的 阅读全文

posted @ 2016-07-01 11:41 小爷的爷 阅读(232) 评论(0) 推荐(0) 编辑