title: Send notification to user after waiting a certain amount of time
body: <p>I'm completely new to objective-c, and Googling this issue for 2 hours has left me with no useful information. In fact I'm even more confused than when I started. I also have a textbook updated for iOS 6, but it is completely useless for the issue. </p>
  
  <p>I simply want the user to enter a certain time in my app (perhaps from a date picker, I haven't decided yet) and then get a notification later (say, for example, 5 hours before the the time the user enters).</p>
  
  <p>The sample picture below illustrates what I mean. Say the user enters 2:09 am, then, at 9:09 pm (5 hours before), he gets the illustrated notification. </p>
  
  <p>I've found this code, from <a href="http://www.smipple.net/snippet/Sounden/Simple%20NSNotificationCenter%20example" rel="nofollow noreferrer">this</a> source, but I'm not even sure if this is what I need for my purposes: </p>
  
  <pre><code>// Add an observer that will respond to loginComplete
  [[NSNotificationCenter defaultCenter] addObserver:self 
                                               selector:@selector(showMainMenu:) 
                                                   name:@"loginComplete" object:nil];
  
  
  // Post a notification to loginComplete
  [[NSNotificationCenter defaultCenter] postNotificationName:@"loginComplete" object:nil];
  
  
  // the function specified in the same class where we defined the addObserver
  - (void)showMainMenu:(NSNotification *)note {
      NSLog(@"Received Notification - Someone seems to have logged in"); 
  }
  </code></pre>
  
  <p>The code seems to be more for NSNotificationCenter. All it does is print the message to the console after the button press event. </p>
  
  <p>Can someone modify the given code, or provide a sample for how I can get the result I'd like.</p>
  
  <p>You don't have to write my app for me. That's not what I'm asking for. Just code samples, or links to them. </p>
  
  <p>To reiterate, I want the user to enter a time into a control, the app determines when a few hours before that time will be, and at that time, it gives a notification. The controls and time stuff I can figure out, but the notification stuff has me really stumped. That's what I need help with. </p>
  
  <p>If someone has been lucky enough to find a good tutorial on this, that will definitely help me as well.  </p>
  
  <p>Given that help on this issue is difficult to find via Google, and that this is probably a common issue for many people, any amount of help will probably benefit not just myself, but others who see this. </p>
  
  <p>Thanks in advance.  </p>
  
  <p><a href="http://www.flickr.com/photos/93162002@N03/8490576365/" rel="nofollow noreferrer" title="notification by BobOB31, on Flickr"><img src="https://farm9.staticflickr.com/8104/8490576365_c1ffc1ed0c.jpg" width="320" height="480" alt="notification"></a></p>