title: UIDatePicker + NSUserDefaults
body: <p>I got an UIDatePicker and want to save its state (only shows hours) after a change.
  That works with:</p>
  
  <pre><code>myDate = [datePicker date];
  NSUserDefaults *tableDefaults = [NSUserDefaults standardUserDefaults];
  tableDefaults setObject:myDate forKey:@"TheDate"];
  </code></pre>
  
  <p>So how can I get this back to my picker when i relaunch the app?</p>
  
  <pre><code>- (void)viewDidLoad {
      if (myDate == nil) {
          [datePicker setDate:[NSDate date] animated:NO];
      } else {
          [datePicker setDate:[myDate date] animated:NO];
      }
  }
  </code></pre>
  
  <p>Does not work for me, I just get the normal date / time.</p>
  
  <p>Anyone who knows how to fix this? :(</p>