3
如何檢測我的interactivePopGestureRecognizer是否已完成,並將返回(彈出)到先前視圖控制器還是移位不夠。然後當前視圖控制器將回到其正常位置。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)?
}
}