#import @interface Father : NSObject @property (nonatomic,copy) NSString *name;@property (nonatomic,retain) NSNumber *age;-(id) initWithName:(NSString...
分类:
移动开发 时间:
2014-08-19 00:57:13
阅读次数:
316
如果将synthesize省略,并且我们自己实现setter和getter方法时,系统就不会生成对应的setter和getter方法,还有实例变量
1,当把语义特性声明为assign时,setter和getter时方法内部实现
- (void)setName:(NSString *)name{
_name = name;
}
- (NSString *)na...
分类:
其他好文 时间:
2014-08-18 23:37:33
阅读次数:
318
- (void)setName:(NSString *)name
{
判断原有对象和新对象是否是同一个对象,如果是同一个,就没有必要再重新赋值,否则会先release 再retain,就会变成野指针
if (_name !=
name) {
释放保有之前对象的所有权
[_name rele...
分类:
其他好文 时间:
2014-08-18 23:37:03
阅读次数:
257
美丽说面试题1,IOS是怎样进行内存管理的,什么是ARC。2,声明Property时,assign,nonatomic,readonly,retain,copy(各什么意思,括号里没打印出来,我猜得)3,delegate需要retain吗?4,什么是designated initlalizer?执行...
分类:
移动开发 时间:
2014-08-18 20:23:32
阅读次数:
345
原文来自于:http://download.csdn.net/album/detail/369jquery.cycle.all.js上传者:itmyhome 上传时间:2014-06-15Cycle是一个很棒的jQuery图片切换插件,提供了非常好的功能来帮助大家更简单的使用插件的幻灯功能,使用方法...
分类:
Web程序 时间:
2014-08-18 10:47:23
阅读次数:
364
#import @interface Person : NSObject@property(nonatomic,copy) NSString *name;@property(nonatomic,retain) NSNumber *age;-(void) setNewName:(NSString *)...
分类:
移动开发 时间:
2014-08-18 01:30:33
阅读次数:
230
@interface Person : NSObject//retian : release 旧值,retain 新值@property(nonatomic,retain) Book *book;//copy:release旧值,copy 新值@property(nonatomic,retain) ...
分类:
其他好文 时间:
2014-08-16 16:20:50
阅读次数:
206
1 @property (retain, nonatomic) NSString *retainStr; 2 @property (copy, nonatomic) NSString *copyStr; 3 4 5 6 @property (retain, nonatomi...
分类:
移动开发 时间:
2014-08-16 09:40:20
阅读次数:
172
如果将synthesize省略,并且我们自己实现setter和getter方法时,系统就不会生成对应的setter和getter方法,还有实例变量
1,当把语义特性声明为assign时,setter和getter时方法内部实现
- (void)setName:(NSString *)name{
_name = name;
}
- (NSString *)name{
...
分类:
其他好文 时间:
2014-08-15 23:51:39
阅读次数:
489
Problem A: The MonocycleA monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel ....
分类:
其他好文 时间:
2014-08-15 14:27:58
阅读次数:
313