标签:12px sel span with log 不能 ble nbsp bsp
copy不能修改,strong可以修改,防止字符串被意外修改.demo:
——————————————————code 你要的 demo——————————————————
@property (nonatomic, copy) NSString * copystring;
@property (nonatomic, strong) NSString *strongString;
NSMutableString *string = [NSMutableString stringWithString:@"a"];
self.copystring = string;
self.strongString = string;
[string appendString: @"b"];
NSLog(@"copyString:%@--StrongString:%@",self.copystring, self.strongString); // opyString:a--StrongString:ab
--------------------------------------------------------------------------------------------------------------------------------------------
NSString 属性为啥用copy 不用strong
标签:12px sel span with log 不能 ble nbsp bsp
原文地址:http://www.cnblogs.com/tufei7/p/6263073.html