If currentSummary
is already a NSMutableString you shouldn't attempt to assign a regular NSString (the result of stringByReplacingOccurrencesOfString:withString:
) to it.
Instead use the mutable equivalent replaceOccurrencesOfString:withString:options:range:
, or add a call to mutableCopy
before the assignment:
// Either
[currentSummary replaceOccurencesOfString:@"
"
withString:@""
options:NULL
range:NSMakeRange(0, [receiver length])];
// Or
currentSummary = [[currentSummary stringByReplacingOccurrencesOfString:@"
"
withString:@""]
mutableCopy];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…