title: How to update running WKInterfaceImage animation?
body: <p>I´m working on a custom rectangular timer as a WKInterfaceImage in my iWatch. The idea is to set the duration as the length on the timer and then animate the timer shrinking to length = 0. It works fine as long as it´s allowed to run the whole animation. But If I try to change the timer length wile the animation is running it adds the new length to the current length. </p>
  
  <p>So basically the problem is that when I try to add a new length it´s combines the old and new length to the timer which makes it far to long. </p>
  
  <p>Would really appreciate some help.   </p>
  
  <p>Here´s the code:</p>
  
  <pre><code>    -(void)setAnimatedTimer {
          NSLog(@"timer called");
  
          NSUserDefaults* defaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.daypal"];
          NSDate *NextActivityStartTime = [defaults objectForKey:@"watchStartDate"];
          NSDate *NextActivityEndTime = [defaults objectForKey:@"watchStopDate"];
  
          NSTimeInterval fromStartTimeToNow = [NextActivityStartTime timeIntervalSinceNow];
          NSTimeInterval fromEndTimeToNow = [NextActivityEndTime timeIntervalSinceNow];
          NSTimeInterval watchDuration = fromEndTimeToNow - fromStartTimeToNow;
          if (fromStartTimeToNow &gt; 0 &amp;&amp; fromEndTimeToNow &gt; 0) {
              _watchActivityTimer.hidden = YES;
  
  int watbchdurationlenght = watchDuration/100;
  
       [self.watchActivityTimer setRelativeWidth:watchDurationLenght withAdjustment:0.0];
  
   [self animateWithDuration:watchDuration animations:^{
          //  [self.watchActivityTimer setHorizontalAlignment:WKInterfaceObjectHorizontalAlignmentRight];
          [self.watchActivityTimer setWidth:0];
  
      }];
  
  
  }
  </code></pre>