title: Animate UIImageView by Set Distance
body: <p>I am trying to move an image view forward by a set distance but can't seem to get it working.  My turnRight and turnLeft methods work fine.  I'm just having issues with the moveForward method. Here is what I'm trying:</p>
  
  <pre><code>- (IBAction)moveForward:(id)sender
  {
      if (turtle.image.imageOrientation == UIImageOrientationRight)
      {
          turtle.frame = CGRectMake(turtle.frame.origin.x + 10, turtle.frame.origin.y, 75, 75);
      }
      else if (turtle.image.imageOrientation == UIImageOrientationLeft)
      {
          turtle.frame = CGRectMake(turtle.frame.origin.x - 10, turtle.frame.origin.y, 75, 75);
      }
      else if (turtle.image.imageOrientation == UIImageOrientationUp)
      {
          turtle.frame = CGRectMake(turtle.frame.origin.x, turtle.frame.origin.y + 10, 75, 75);
      }
      else if (turtle.image.imageOrientation == UIImageOrientationDown)
      {
          turtle.frame = CGRectMake(turtle.frame.origin.x, turtle.frame.origin.y - 10, 75, 75);
      }
  }
  
  - (IBAction)turnRight:(id)sender
  {   
      UIImage *newImage;
  
      switch (turtle.image.imageOrientation)
      {
          case UIImageOrientationUp:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage] scale:1.0f orientation:UIImageOrientationRight];
              turtle.contentMode = UIViewContentModeScaleAspectFit;
              break;
          case UIImageOrientationLeft:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage]scale:1.0f orientation:UIImageOrientationUp];
              turtle.contentMode = UIViewContentModeScaleAspectFill;
              break;
          case UIImageOrientationDown:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage] scale:1.0f orientation:UIImageOrientationLeft];
              turtle.contentMode = UIViewContentModeScaleAspectFit;
              break;
          case UIImageOrientationRight:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage]scale:1.0f orientation:UIImageOrientationDown];
              turtle.contentMode = UIViewContentModeScaleAspectFill;
              break;
          default:
              break;
      }
      turtle.image = newImage;
  }
  
  - (IBAction)turnLeft:(id)sender
  {
      UIImage *newImage;
  
      switch (turtle.image.imageOrientation)
      {
          case UIImageOrientationUp:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage] scale:1.0f orientation:UIImageOrientationLeft];
              turtle.contentMode = UIViewContentModeScaleAspectFit;
              break;
          case UIImageOrientationLeft:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage]scale:1.0f orientation:UIImageOrientationDown];
              turtle.contentMode = UIViewContentModeScaleAspectFill;
              break;
          case UIImageOrientationDown:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage] scale:1.0f orientation:UIImageOrientationRight];
              turtle.contentMode = UIViewContentModeScaleAspectFit;
              break;
          case UIImageOrientationRight:
              newImage = [UIImage imageWithCGImage:[turtle.image CGImage]scale:1.0f orientation:UIImageOrientationUp];
              turtle.contentMode = UIViewContentModeScaleAspectFill;
              break;
          default:
              break;
      }
      turtle.image = newImage;
  }
  </code></pre>