title: How do I get two identical UISwipeGestureRecognizers to work simultaneously based on location of touch?
body: <p>In my current Sprite Kit project, I have coded a mechanic where I have employed a UISwipeGestureRecognizer for the left direction which is applied to two nodes. When a left swipe occurs on one side of the screen, one of the nodes moves and when a left swipe occurs on the other side of the screen, the other node moves. However, I cannot find a way to make the nodes move at the same time; 2 left swipes are not recognized although they are in different locations on the screen. Similarly, I have also coded a similar mechanic for when the user swipes to the right. Below is my code. I would greatly appreciate any help. As of now, only one node can be swipes at a time, not both together, which is what i would like</p>
  
  <pre><code>    -(void)didMoveToView:(SKView *)view {
      UISwipeGestureRecognizer *leftSwipe1 = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(leftSwiped1:)];
  
  [leftSwipe1 setDirection:UISwipeGestureRecognizerDirectionLeft];
  [leftSwipe1 setNumberOfTouchesRequired:1];
  [self.view addGestureRecognizer:leftSwipe1];
  
  UISwipeGestureRecognizer *rightSwipe1 = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(rightSwiped1:)];
  
  [rightSwipe1 setDirection:UISwipeGestureRecognizerDirectionRight];
  [rightSwipe1 setNumberOfTouchesRequired:1];
  [self.view addGestureRecognizer:rightSwipe1];
  
  self.physicsWorld.gravity = CGVectorMake(0, -9.8);
  self.physicsWorld.contactDelegate = self;
      }
      -(void)rightSwiped1:(UIGestureRecognizer *)gestureRecognizer {
  
  CGPoint pt = [gestureRecognizer locationInView:self.view];
  if(pt.x &lt; (self.view.bounds.size.width/2))
  {
      SKNode *person1 = [self childNodeWithName:@"person1"];
      SKAction *moveRight = [SKAction moveTo:CGPointMake(CGRectGetMidX(self.frame) - 80, CGRectGetMidY(self.frame) + 200) duration:0.2f];
      [person1 runAction:moveRight];
  } else if (pt.x &gt; (self.view.bounds.size.width/2)) {
  
      SKNode *person2 = [self childNodeWithName:@"person2"];
      SKAction *moveRight2 = [SKAction moveTo:CGPointMake(CGRectGetMidX(self.frame) + 400, CGRectGetMidY(self.frame) + 200) duration:0.2f];
      [person2 runAction:moveRight2];
  }
  
  
      }
      -(void)leftSwiped1:(UIGestureRecognizer *)gestureRecognizer {
  CGPoint pt = [gestureRecognizer locationInView:self.view];
  if(pt.x &lt; (self.view.bounds.size.width/2))
  {
      SKNode *person1 = [self childNodeWithName:@"person1"];
      SKAction *moveLeft = [SKAction moveTo:CGPointMake(CGRectGetMidX(self.frame) - 400, CGRectGetMidY(self.frame) + 200) duration:0.2f];
      [person1 runAction:moveLeft];
  } else if (pt.x &gt; (self.view.bounds.size.width/2)) {
  
      SKNode *person2 = [self childNodeWithName:@"person2"];
  SKAction *moveLeft2 = [SKAction moveTo:CGPointMake(CGRectGetMidX(self.frame) + 80, CGRectGetMidY(self.frame) + 200) duration:0.2f];
  [person2 runAction:moveLeft2];
  }
      }
  </code></pre>