obj.mutableStr = (NSMutableString *)[[NSMutableString alloc] initWithString:@"Hello"];
NSLog(@"%@", obj.mutableStr);
[obj.mutableStr appendString:@"World!"]; // crash here: Attempt to mutate immutable object with appendString:
NSLog(@"%@", obj.mutableStr);
我这个属性声明为copy,程序崩了
转载于:https://www.cnblogs.com/lisa090818/p/3441981.html