ZLSwipeableView
ZLSwipeableView copied to clipboard
Disable swiping until topSwipeableView clears
hello, any way to disable gestures for the next view until topSwipeableView is discarded? thank you for your help!
I've been looking for this too. I might try to implement this by myself since I think there's no solution for this yet.
Edit: what I found out so far is that there's a delegate method implemented in ZLSwipeableViewSwipingDeterminator that can be used like below:
- (BOOL)shouldSwipeView:(UIView *)view
movement:(ZLSwipeableViewMovement *)movement
swipeableView:(ZLSwipeableView *)swipeableView {
if ([view isEqual:swipeableView.topView]) {
return YES;
}
return NO;
}
This code will only prevent the undesired view from completing the swipe (and being discarded), but it's still possible to grab and drag it. Options like "setUserInteractionEnabled" to NO didn't work so far.
It's something.