用property声明属性时,strong,copy,weak的一般用法
生活随笔
收集整理的這篇文章主要介紹了
用property声明属性时,strong,copy,weak的一般用法
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
//一般情況下,在聲明字符串對象的時候使用 copy//UI對象使用weak//其他對象使用strong
@property(nonatomic,copy)NSString *name;@property(nonatomic,weak)UIImage *image;@property(nonatomic,strong)NSArray *array;
?
轉載于:https://www.cnblogs.com/shinechen/p/4077660.html
總結
以上是生活随笔為你收集整理的用property声明属性时,strong,copy,weak的一般用法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: shell之字体颜色显示
- 下一篇: 申论万用句型——背下来