If I have a UILabel:
USD_time.text = [NSString stringWithFormat:@"%@ %.2dm %.2ds", pre, min, sec];
Is it possible to reference the UILabel as a variable?
Ex:
NSString *myLabel = @"USD_time";
myLabel.text = [NSString stringWithFormat:@"%@ %.2dm %.2ds", pre, min, sec];
I know this does not work, I am unsure what the proper format would be. Also I am unsure what this is called.
Thank so much.
Read up on Key Value Coding, it’s just the thing you are looking for.