美文网首页
strong assign copy这三种都在什么情况下使用

strong assign copy这三种都在什么情况下使用

作者: 大白_帕克 | 来源:发表于2018-11-01 20:33 被阅读0次

copy 修饰字符串
strong 修饰控件、数组、字典
assign 修饰基本数据类型
基本数据类型分别为:int(整型)、float(浮点)、double(双精度)、BOOL(布尔类型)
如下:

@property (nonatomic,strong)NSString *name;//姓名
@property (nonatomic,strong)NSString *age;//年龄
@property (nonatomic,copy)NSString *title;//标题
@property (nonatomic,copy)NSString *subhead;//副标题
@property (nonatomic,assign)BOOL isShowPlay;//是否展示播放
@property (nonatomic,assign)BOOL isShowIcon;//是否展示小图片

相关文章

网友评论

      本文标题:strong assign copy这三种都在什么情况下使用

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