iPhone Dev - NSString Creation
问题 I'm really confused with NSStrings. Like when should I do NSString *aString = @"Hello"; of should it be: NSString *aString = [[NSString alloc] initWithString:@"Hello"]; But then its different when you're assigning a value to an NSString property isn't it? Can someone clear this up for me? Thanks!! 回答1: In general you should do the first, but they are mostly functionally the same. You can treat constant NSStrings just like normal NSString string objects, for instance: [@"Hello" length] will