title: iOS Pinch Scale and Two Finger Rotate at same time
body: <p>Here is my code:</p>
  
  <p>viewDidLoad:</p>
  
  <pre><code>UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(pinch:)];
  [self.canvas addGestureRecognizer:pinch];
  pinch.delegate = self;
  
  UIRotationGestureRecognizer *twoFingersRotate = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(pinchRotate:)];
  [[self canvas] addGestureRecognizer:twoFingersRotate];
  
  twoFingersRotate.delegate = self;
  </code></pre>
  
  <p>Code For Pinches and Rotates:</p>
  
  <pre><code>-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
  {
      return YES;
  }
  
  -(void)pinchRotate:(UIRotationGestureRecognizer*)rotate
  {
      SMImage *selectedImage = [DataCenter sharedDataCenter].selectedImage;
  
      switch (rotate.state) 
      {
          case UIGestureRecognizerStateBegan:
          {
              selectedImage.referenceTransform = selectedImage.transform;
              break;
          }
          case UIGestureRecognizerStateChanged:
          {
              selectedImage.transform = CGAffineTransformRotate(selectedImage.referenceTransform, ([rotate rotation] * 55) * M_PI/180);
              break;
          }
  
          default:
              break;
      }
  }
  
  -(void)pinch:(UIPinchGestureRecognizer*)pinch
  {
      SMImage *selectedImage = [DataCenter sharedDataCenter].selectedImage;
      [self itemSelected];
  
      switch (pinch.state) 
      {
          case UIGestureRecognizerStateBegan:
          {
              selectedImage.referenceTransform = selectedImage.transform;
              break;
          }
          case UIGestureRecognizerStateChanged:
          {
              CGAffineTransform transform = CGAffineTransformScale(selectedImage.referenceTransform, pinch.scale, pinch.scale);
              selectedImage.transform = transform;
              break;
          }
  
          default:
              break;
      }
  }
  </code></pre>
  
  <p>My rotation works great on its own and my scale works great on its own, but they wont work together. One always works or the other doesn't.  When I implement shouldRecognizeSimultaneouslyWithGestureRecognizer the two gestures seem to fight against each other and produce poor results.  What am I missing? (Yes I have implemented <code>&lt;UIGestureRecognizerDelegate&gt;</code>)</p>