title: Convert NSString into NSTimeInterval
body: <p>I tried to make a countdown with the NSTimeInterval. But I want to be able to change the interval without releasing an update each time. So I tried to import the Timeinterval from my website. I've stored the numbers for the NSTimeInterval in a NSString and want now to convert them into NSTimeInterval in order to implement it into the Countdown code...</p>
  
  <p>...but it's not working. Any ideas?</p>
  
  <pre><code>label.text = string;
  double timeInterval = [label.text doubleValue];
  NSTimeInterval intervalForTimer = timeInterval;
  destinationDate = [[NSDate dateWithTimeIntervalSince1970:intervalForTimer] retain];
  timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateLabel) userInfo:nil repeats:YES];
  </code></pre>
  
  <p>edit:</p>
  
  <pre><code>- (void)updateLabel {
  
      NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
      int units = NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
      NSDateComponents *components = [calendar components:units fromDate:[NSDate date] toDate:destinationDate options:0];
      [dateLabel setText:[NSString stringWithFormat:@"%d%c %d%c %d%c %d%c %d%c", [components month], 'm', [components day], 'd', [components minute], 'm', [components second], 's']];
  
  }
  </code></pre>
  
  <p>My new code looks like that:</p>
  
  <pre><code>    NSLog(@"Downloaded file with contents: %@", string);
      double timeInterval = [string doubleValue];
      label.text = [NSString stringWithFormat:@"%d", (int)timeInterval];
      NSTimeInterval intervalForTimer = timeInterval;
      destinationDate = [[NSDate dateWithTimeIntervalSince1970:timeInterval] retain];
      timer = [NSTimer scheduledTimerWithTimeInterval:intervalForTimer target:self selector:@selector(updateLabel) userInfo:nil repeats:YES];
  </code></pre>
  
  <p>But the dateLabel doesn't do anything...</p>