error : 'Attempt to mutate immutable object with appendString:' --
问题 I am getting an error 'Attempt to mutate immutable object with appendString:' and my code is NSMutableString *resultString= [[NSMutableString alloc]init]; for (NSMutableString *s in self.ArrayValue) { [resultString appendString:s]; NSLog(resultString); } ArrayValue is NSMutableArray. I am not able to understand where is the problem thank you in advance 回答1: As posted, the code you have will not give you the error you describe. Probably, somewhere between allocating resultString and the for