Brian, it's also worth throwing it here - the others are, of course, correct that you don't need to declare a string variable. However, the next time you want to declare a string, you do not need to do the following:
NSString *myString = [[NSString alloc] initWithFormat:@"SomeText"];
Although the above works, it contains a saved NSString variable, which you will then need to explicitly release after you finish it.
The next time you want to use a string variable, you can use the @ symbol in a much more convenient way:
NSString *myString = @"SomeText";
It will be auto-implemented when you are done with it to avoid memory leak ...
Hope this helps!
h4xxr Aug 19 '09 at 22:59 2009-08-19 22:59
source share