Is it possible to “link” UILabel text property with another NSString so that when this other NSString is changed also UILabel text property changes?
Example:
UILabel *label = [[UILabel alloc] init];
NSString *str = @"labelText1";
label.text = str;
str = @"labelText2"; //after this assignment label.text is still "labelText1"
In your question you haven’t “changed” any objects –
NSStringinstances are immutable, and you’ve just said that some variable points to one instance instead of another. Assuming that your string is really a property of some other model object, you could have your controller observe that property (with-observeValueForKeyPath:ofObject:change:context) and update the label every time it sees a change.