interactivePopGestureRecognizer - 弹出或返回到curent视图控制器

时间:2015-09-09 08:18:32

标签: ios objective-c uinavigationcontroller interactivepopgesture

如何检测我的interactivePopGestureRecognizer是否已完成并将返回(弹出)到上一个视图控制器或者移位是不够的。然后当前视图控制器将返回其正常位置。

我的代码:

if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
    [self.interactivePopGestureRecognizer addTarget:self action:@selector(defaultGestureAction:)];
}

- (void)defaultGestureAction:(UIGestureRecognizer *)sender {

   if (sender.state == UIGestureRecognizerStateBegan || sender.state == UIGestureRecognizerStateChanged) {

   } else {

   //this code is fired when I touch up
   //is there any way to check this action (pop or stay)?
   }
}

0 个答案:

没有答案