title: CGAffineTransformMakeTranslation does not translate correctly
body: <p>I see two different behaviors for CGAffineTransformMakeTranslation between simulator mode and the real device.</p>
  
  <p>(on iOS 8.1)
  For an iPhone4, to get CGAffineTransformMakeTranslation to work on the real device, I have to translate by twice the amount.
  On the iPhone4s simulator, I have to translate just by the amount with not scaling.</p>
  
  <p>Perhaps I'm missing something obvious but since both have the same number of logical pixels, I shouldn't have to adjust CGAffineTransformMakeTranslation to make translation work.</p>
  
  <p>Here I have a view I'm pulling in and out of view by swiping:</p>
  
  <pre><code>CGRect menuOrigin = self.rootController.containerView.bounds;
  switch (direction) {
      case UISwipeGestureRecognizerDirectionLeft:
      {
          NSLog(@"Initial Position: %@", NSStringFromCGPoint(self.rootController.containerView.frame.origin));
          NSLog(@"Initial Scale: %f", [self contentScaleFactor]);
          NSLog(@"Initial Center: %@", NSStringFromCGPoint([self center]));
          CGAffineTransform transform = CGAffineTransformMakeTranslation(-1.0 * widthToSlide, 0);
          self.rootController.containerView.transform = transform;
          [UIView animateWithDuration:0.4 animations:^{
              self.rootController.containerView.transform = transform;
              [self.rootController.containerView layoutIfNeeded];
          } completion:^(BOOL finished) {
              NSLog(@"Final Position: %@", NSStringFromCGPoint(self.rootController.containerView.frame.origin));
              NSLog(@"Final Scale: %f", [self contentScaleFactor]);
              NSLog(@"Final Center: %@", NSStringFromCGPoint([self center]));
          }];
      }
          break;
      case UISwipeGestureRecognizerDirectionRight:
      {
          CGAffineTransform transform = CGAffineTransformMakeTranslation(0, 0.0);
          [UIView animateWithDuration:0.4 animations:^{
              self.rootController.containerView.transform = transform;
              [self.rootController.containerView layoutIfNeeded];
          } completion:^(BOOL finished) {
          }];
      }
      default:
          break;
  }
  
  [self.rootController.containerView setNeedsDisplay];
  [self setNeedsDisplay];
  </code></pre>
  
  <p>NSLog goes like this for the iPhone4 real device:</p>
  
  <pre><code>2015-10-15 01:12:37.547 Local[5307:60b] swipeLocalPull adjusting width 183
  2015-10-15 01:12:37.556 Local[5307:60b] Screen size: {320, 480}
  2015-10-15 01:12:37.559 Local[5307:60b] Initial Position: {0, 66}
  2015-10-15 01:12:37.974 Local[5307:60b] Final Position: {-91.5, 66}
  </code></pre>
  
  <p>and for the iPhone4s iOS 8.1 simulator:</p>
  
  <pre><code>2015-10-15 01:19:19.479 Local[56380:3061577] swipeLocalPull adjusting width 183
  2015-10-15 01:19:19.480 Local[56380:3061577] Screen size: {320, 480}
  2015-10-15 01:19:19.480 Local[56380:3061577] Initial Position: {0, 66}
  2015-10-15 01:19:19.886 Local[56380:3061577] Final Position: {-183, 66}
  </code></pre>
  
  <p>The simulator is translated correctly. Notice, the real device translated only half way to -91.5. Why is this and how can I detect or compensate for this. Sorry if this question has been asked before but I could not find the root cause for this behavior. I only care about x translation at this moment.</p>
  
  <p>Anyone have clues for this behavior.?</p>
  
  <p><strong>Update</strong>
  By request, here's a few extra outputs:</p>
  
  <p>---iPhone4 values---</p>
  
  <pre><code>2015-10-15 17:20:59.591 Local[5617:60b] swipeLocalPull adjusting width 183
  2015-10-15 17:20:59.596 Local[5617:60b] Screen size: {320, 480}
  2015-10-15 17:20:59.599 Local[5617:60b] Initial Position: {0, 66}
  2015-10-15 17:20:59.601 Local[5617:60b] Initial Scale: 2.000000
  2015-10-15 17:20:59.603 Local[5617:60b] Initial Center: {201, 99}
  2015-10-15 17:21:00.015 Local[5617:60b] Final Position: {-91.5, 66}
  2015-10-15 17:21:00.018 Local[5617:60b] Final Scale: 2.000000
  2015-10-15 17:21:00.037 Local[5617:60b] Final Center: {201, 99}
  </code></pre>
  
  <p>---iPhone4s Simulator---</p>
  
  <pre><code>2015-10-15 17:39:59.850 Local[57069:3104390] swipeLocalPull adjusting width 183
  2015-10-15 17:39:59.851 Local[57069:3104390] Screen size: {320, 480}
  2015-10-15 17:39:59.851 Local[57069:3104390] Initial Position: {0, 66}
  2015-10-15 17:39:59.851 Local[57069:3104390] Initial Scale: 2.000000
  2015-10-15 17:39:59.851 Local[57069:3104390] Initial Center: {201, 99}
  2015-10-15 17:39:59.852 Local[57069:3104390] Final Position: {-183, 66}
  2015-10-15 17:39:59.852 Local[57069:3104390] Final Scale: 2.000000
  2015-10-15 17:39:59.852 Local[57069:3104390] Final Center: {201, 99}
  </code></pre>
  
  <p>They both seem to be at @2x scale so I expect the same code to work for both.</p>
  
  <p><strong>Working Code</strong></p>
  
  <p>I got it to work with the following(if someone explains why, then I'll just mark that as the answer):</p>
  
  <pre><code>switch (direction) {
          case UISwipeGestureRecognizerDirectionLeft:
          {
              NSLog(@"Initial Position: %@", NSStringFromCGPoint(self.rootController.containerView.frame.origin));
              NSLog(@"Initial Scale: %f", [self contentScaleFactor]);
              NSLog(@"Initial Center: %@", NSStringFromCGPoint([self center]));
  
              CGPoint currentPos = self.rootController.containerView.center;
              currentPos.x -= widthToSlide;
              [UIView animateWithDuration: .4
                                    delay: 0
                                  options: (UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction)
                               animations:^{
                                   self.rootController.containerView.center = currentPos;
                               }
                               completion:^(BOOL finished) { }
               ];
          }
              break;
          case UISwipeGestureRecognizerDirectionRight:
          {
              CGPoint currentPos = self.rootController.containerView.center;
              currentPos.x += widthToSlide;
  
              [UIView animateWithDuration: .4
                                    delay: 0
                                  options: (UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction)
                               animations:^{
                                   self.rootController.containerView.center = currentPos;
                               }
                               completion:^(BOOL finished) { }
               ];
          }
          default:
              break;
      }
  
      [self.rootController.containerView setNeedsDisplay];
      [self setNeedsDisplay];
  </code></pre>