NSString concatenate on creation
问题 I'm trying to concatenate 2 strings assigning the result to a new string. Normally I would do this way: NSString * s = [NSString stringWithFormat: @"%@%@", str1, str2]; Now I wish s to be static static NSString * s = [NSString stringWithFormat: @"%@%@", str1, str2]; but compiler kick me with "Initializer element is not a compile-time..." Is there any way to do this? I Googled a bit with no results and also I have not found answers on StackOverflow asking the question. And what about using a