title: How to set UITextField default value to user's previous input?
body: <p>My iOS app starts off with a pop-up message (UIAlertView) where you have to enter text in a UITextField. I would like the default value of the UITextField to be equal to the user's previous input.</p>
  
  <p>Example: at 1pm, the user types "Happy" and clicks OK. When he re-opens the app at 2pm, the Text Field already has "Happy" as default value, he just needs to click OK. At 3pm, he opens the app, the default value is "Happy" but he changes it to "Angry", and then clicks OK. At 4pm, "Angry" is the default value when he opens the app.</p>
  
  <pre><code>- (void)viewDidLoad
  {
  [super viewDidLoad];
  
  //Pop-up TextField
  UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Hello" message:@"How are you feeling ?" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
  alert.alertViewStyle = UIAlertViewStylePlainTextInput;
  UITextField * machineTextFieldInit = [alert textFieldAtIndex:0];
  machineTextFieldInit.placeholder = @"Mood";
  [alert show];
  }
  </code></pre>
  
  <p>Many thanks in advance for your help and advice !</p>