title: Recognizing Longpress gesture on two Uibuttons in ios
body: <p>I have two UIbuttons,and I want to implement Longpressgesture on both.</p>
  
  <p>So I wrote the below code..</p>
  
  <pre><code>-(void)viewdidLoad
  {
   UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(buttonLongPressed:)];
      longPress.minimumPressDuration = 0.5;
      [Button1 addGestureRecognizer:longPress];
      [Button2 addGestureRecognizer:longPress];
  
  }
  
  - (void)buttonLongPressed:(UILongPressGestureRecognizer *)sender
  {    
      if(sender.state == UIGestureRecognizerStateBegan) 
      {        
  
      }   
  }
  </code></pre>
  
  <p>now my doubt is how shall I check which button is longpresses?</p>
  
  <p>Thanks
  Ranjit</p>