PanGestureRecognizer取消UIButton Press

时间:2013-05-30 19:35:20

标签: objective-c uigesturerecognizer

我在其上设置了一些带有PanGestureRecognizers的按钮,我希望能够在将按钮移动到所需位置后仍然可以访问TouchUpInside。但是,一旦PanGesture接管它就会取消按钮的按下状态。到目前为止,我有:

- (IBAction)drag: (UIPanGestureRecognizer *)recognizer
{
CGPoint touchLocation = [recognizer locationInView:self.view];

  if (recognizer.state == (Ive tried every UIGestureRecognizerState available here)
  {
    NSLog(@"It's Working");

    [_LauncherOne setSelected:TRUE];
    [_LauncherOne setHighlighted:TRUE];
  }

但识别者没有开火。他们在错误的地方吗?

更新

所以这看起来就像我正在寻找的那样,但我想我的实施错了。我放      “recognizer.cancelsTouchesInView = NO;” 我的IBAction声明之后,但它不起作用。任何想法为什么?

1 个答案:

答案 0 :(得分:0)