title: iOS: Alert In Notification Center Issue
body: <p>I wrote an app that will alert the user when a date is coming up. I have a date picker that I implemented and saved the entered date using this code in my <code>viewDidLoad</code> method:</p>
  
  <pre><code>- (void)viewDidLoad {
  
  
      NSDate *storedDate = [[NSUserDefaults standardUserDefaults] objectForKey:@"DatePickerViewController.selectedDate"];
  
  
      [self.datePicker setDate:storedDate animated:NO];
  }
  </code></pre>
  
  <p>And this is the method that saves the data:</p>
  
  <pre><code>- (IBAction)dateChanged:(id)sender {
  
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  
  NSDate *selectedDate = [self.datePicker date];
  
  
  [defaults setObject:selectedDate forKey:@"DatePickerViewController.selectedDate"];}
  </code></pre>
  
  <p>I'm trying to have an alert in the notification center around 36 hours before the date using this code:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  UILocalNotification *localNotif = [[UILocalNotification alloc] init];
  
  NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  [dateFormatter setDateFormat:@"mm'/'dd'/'yyyy"];
  NSDate *eventDate=[dateFormatter dateFromString:datePicker];
  
  localNotif.fireDate = [eventDate dateByAddingTimeInterval:-13*60*60];
  localNotif.timeZone = [NSTimeZone defaultTimeZone];
  
  
  localNotif.alertBody = @"Event tomorrow!";
  
  localNotif.alertAction = nil;
  
  localNotif.soundName = UILocalNotificationDefaultSoundName;
  localNotif.applicationIconBadgeNumber = 0;
  [[UIApplication sharedApplication]presentLocalNotificationNow:localNotif];    
  
  return YES;
  </code></pre>
  
  <p>}</p>
  
  <p>My issue is in the <code>dateFromString:datePicker</code>. I'm not sure what to put in there, I'm used to doing this with text fields, not pickers. Any help is much appreciated, thank you!</p>