Strings: initWithFormat

Dominyo

Registered
I'm a complete newbie to Cocoa and Objective-C. I'm currently writing a program with a string that needs to hold the contents of a variable.

Code:
NSMutableString *string1 = [[NSMutableString alloc] initWithFormat:@"%i", variable1];

Works fine, until the variable changes, and the string doesn't. Anyway to update the string to hold the new contents of the variable? I've tried setString:, but that doesn't work, and there's no setStringWithFormat:.
 
Back
Top