@property解释及其相关参数说明
参数:retain assign copy strong weak unsafe_unretained autoreleasing readwrite readonly nonatomic atomic setter getter...
分类:
其他好文 时间:
2015-05-01 13:26:29
阅读次数:
1031
1 //仅仅声明属性的类,称为实体类(模型类)2 //Student.h中声明属性3 @property(strong,nonatomic)NSString *name;4 @property(assign,nonatomic)int age;5 @property(strong,nonatomic...
分类:
Web程序 时间:
2015-04-29 19:26:39
阅读次数:
126
iOS5中加入了新知识,就是ARC,其实我并不是很喜欢它,因为习惯了自己管理内存。但是学习还是很有必要的。 在iOS开发过程中,属性的定义往往与retain, assign, copy有关,我想大家都很熟悉了,在此我也不介绍,网上...
分类:
其他好文 时间:
2015-04-29 17:42:08
阅读次数:
189
iOS培训------我的c语言笔记,期待与您交流!copy,assign,strong,retain,weak,readonly,readwrite,nonatomic,atomic,unsafe_unretained的使用与区别最近在学习iOS的过程个遇到了不少问题,知道概念也看过示例代码,但是...
分类:
其他好文 时间:
2015-04-28 15:29:18
阅读次数:
149
------Java培训、Android培训、iOS培训、.Net培训、期待与您交流! -------1,set方法内存管理相关的参数*retain:release旧值,retain新值(适用于OC对象类型)*assign:直接赋值(默认,只用于非OC对象类型)*copy: release旧值,co...
分类:
其他好文 时间:
2015-04-27 09:33:23
阅读次数:
100
Person类中
@property(nonatomic,strong)
NSString * name ;
@property(nonatomic ,strong)NSString *year;
@property(nonatomic,assign)
int age;
-(id)initWithName:(NSString *)name andYear:(NSStri...
分类:
编程语言 时间:
2015-04-24 14:23:42
阅读次数:
158
Assign the taskTime Limit: 1 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3974DescriptionThere is a company that has N employe...
分类:
其他好文 时间:
2015-04-22 23:42:10
阅读次数:
174
题意 公司中有n个员工 除了boss 每个员工都有自己的上司 自己下属的下属也是自己的下属 当给一个员工分配任务时 这个员工会把任务也分配到自己的所有下属 每个员工都只做最后一个被分配的任务 对于每个C x 输出员工x正在做的任务 没有就输出-1
把员工的关系数建成类似并查集的结构 把每个直接分配任务的员工的任务和任务分配时间保存起来 查询时只要找这个员工所有父节点中最...
分类:
其他好文 时间:
2015-04-22 22:13:03
阅读次数:
164
#import "ViewController.h"
#import "QSSDateHelper.h"
@interface ViewController ()
@property (nonatomic,strong) UIButton *btn;
@property (nonatomic,assign) BOOL isTouch;
@property (nonatomic,assig...
分类:
移动开发 时间:
2015-04-22 18:15:23
阅读次数:
196
比如车票类Ticket,保证票只创建了一次。1.定义静态全局变量 static Ticket *SharedInstance;定义一个票数的变量 @property(assign,atomic)NSInteger tickets;atomic 原子属性,在多线程中一个线程访问了其他线程不能访问了。另...
分类:
移动开发 时间:
2015-04-22 13:13:21
阅读次数:
128