摘要: @Property的strong 与weakstrong关键字与retain关似,用了它,引用计数自动+1,用实例更能说明一切@property(nonatomic,strong)NSString*string1; @property(nonatomic,strong)NSString*string2; 有这样两个属性,@synthesizestring1; @synthesizestring2; 猜一下下面代码将输出什么结果?self.string1=@"String1"; self.string2=self.string1; self.string1=nil; NSLo 阅读全文
posted @ 2013-05-28 16:10 cqclassic 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 一:获取documents目录路径//1,获取家目录路径的函数:NSString*homeDir =NSHomeDirectory();//2,获取Documents目录路径的方法:a:NSArray*paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);NSString*docDir = [pathsobjectAtIndex:0];b:[NSHomeDirectory()stringByAppendingPathComponent:@"Documents" 阅读全文
posted @ 2013-05-28 10:40 cqclassic 阅读(222) 评论(0) 推荐(0) 编辑