Hi..
Im working on a part of code where a label text should change value after getting a new value from a singleton class. Seems simple enough, and after testing the value it actually changes aswell, but its not updated in the view. In the view it stays the same as before. I
ve tried the code both in -(void)viewDidLoad and -(void)viewWillAppear:(BOOL)animated
, but with the same result.. Any ideas?
Here are my code:
- (void)viewDidLoad {
//get the new status value
sharedBarCodeValue = [BarcodeValues sharedBarCodeValues];
if([[sharedBarCodeValue storeBarCodeValue] isEqualToString:@"123456"])
{
[statusText setText:@"This is a new status text"];
}
//for testing, output status text
NSLog(@"status: %@", statusText.text);
[super viewDidLoad];
}
Edit: Oh, and I should mention that I´ve implemented a navigation controller, and the value should change when popping a 2. level view off the stack and going back to the root view.