You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 5, 2020. It is now read-only.
I'm trying to implement a radial menu where you could tap and hold the menu, which will open the menu and close it when the finger is lifted. The implementation works almost entirely, other than if you
lift your finger, while the menu is still opening, and immediately tap and hold the menu (and drag) it again. This results in the menu (or the mainItem of the menu) to bounce to the centre of the frame.
The following is my implementation. [self checkHitTarget] simply checks which item DLWMMenuItem is selected.
- (void)receivedPan:(UIPanGestureRecognizer *)recognizer onItem:(DLWMMenuItem *)item inMenu:(DLWMMenu *)menu {
switch (recognizer.state) {
case UIGestureRecognizerStateBegan:
if ([menu isClosedOrClosing]) {
[self.menu open];
}
break;
case UIGestureRecognizerStateChanged:
[selfcheckHitTarget];
case UIGestureRecognizerStateEnded:
case UIGestureRecognizerStateCancelled:
case UIGestureRecognizerStateFailed:
if ([menu isOpenedOrOpening]){
if (item == menu.mainItem){
[self.menu close];
} else {
[menu closeWithSpecialAnimator:[[DLWMSelectionMenuAnimator alloc]init] forItem:item];
}
}
break;
default:
break;
}
}
I've tried going through most of the DLWMMenu implementation dropping break points everywhere, but I still can't pinpoint the exact place it'll break. I'm guessing it's something to do with the state of the menu while the menu is animating (closing or opening)