title: NSUserDefaults - storing and retrieving data
body: <p>I have some data that's been stored using NSUserDefaults in one view and then being displayed in another view. The issue I'm having is that when the user changes the data and then returns to the view where the data is displayed (in a UILabel), the data that was first saved is displayed instead of the newer saved text.</p>
  
  <p>I think I need to do something with <strong>viewDidAppear</strong> perhaps, so that every time the view appears the newest saved data is displayed.</p>
  
  <p>here's the code that Im displaying the NSUserDefaults stored info on a UILabel:</p>
  
  <pre><code>   NSString *aValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"myTextFieldKey"];
      NSLog(@"Value from standardUserDefaults: %@", aValue);
  
      NSLog(@"Label: %@", myLabel);
      myLabel.text = aValue;
  </code></pre>
  
  <p>if someone could point me in the right direction that would be great,</p>
  
  <p>thanks</p>