I have a method which I created that appends some new text to a UILabel. I've tried two ways of doing this (one is commented out) but both of them only update the label the first time. Any more calls to this method do not update the label.
- (void) updateLog: (NSString*) text
{
/*
NSMutableString *newText = [logLabel.text mutableCopy];
[newText appendString: text];
logLabel.text = newText;
*/
logLabel.text = [logLabel.text stringByAppendingFormat:@"%@", text];
}
I am calling the method like this (the method is in the viewController):
[viewController updateLog: @"\nStarting...\n"]; // Works
[viewController updateLog: @"Test\n"]; // Does not work
I have searched everywhere for an answer, what am I missing? Thanks!