title: How to Ignore Swipe gesture To use touchBegan
body: <p>When i run this program every time I touch the screen I would like the ball to move down. The problem is that every time I do that, the Swipe gesture(Moving Right) recognize the touch as well when I don't want it too. Which will cause the ball to move Sideway(Applied the touch and swipe).</p>
  
  <p>Is there a way to ignore the Swipe gesture so my touchBegan is alone.</p>
  
  <p>ViewController.h</p>
  
  <pre><code>int MoveBallRight;
  int MoveBallDown;
  @interface ViewController : UIViewController{
  
      __weak IBOutlet UIImageView *Ball;
  
      __weak IBOutlet UIButton *StartButton;
  
  }
  - (IBAction)StartButton:(id)sender;
  
  
  @end
  </code></pre>
  
  <p>ViewController.m</p>
  
  <pre><code>@interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (IBAction)StartButton:(id)sender {
      MoveBallRight = 30;
      MoveBallDown = 30;
  
  
      StartButton.hidden = YES;
  
  
      UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeRight)]; swipeRight.direction = UISwipeGestureRecognizerDirectionRight; [self.view addGestureRecognizer:swipeRight];
  
  
  
  }
  -(void)handleSwipeRight{
  
      Ball.center = CGPointMake(Ball.center.x + MoveBallRight, Ball.center.y);
  
  }
  
  -(void)touchesBegan:(NSSet&lt;UITouch *&gt; *)touches withEvent:(UIEvent *)event{
  
      Ball.center = CGPointMake(Ball.center.x , Ball.center.y + MoveBallDown);
  
  }
  - (void)viewDidLoad {
      [super viewDidLoad];
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
  }
  @end
  </code></pre>