wzmeda
Last Updated: February 25, 2016
·
1.208K
· greensamuelm

NSString objects are always constants!

Is there ugly code like this in your code base?

NSString *message = [NSString stringWithFormat:@"%@ world!", @"Hello"];

Remember that all NSString objects are compile time constants. The above can easily be re-written as:

NSString *message = [@"Hello" stringByAppendingString:@" world!"];