Fixes swipeable button state handling
This commit is contained in:
1 parent
3ece9e2ccb
commit
e14e945a68
1 file changed
+2
-2
@@ -766,7 +766,7 @@ CallbackBridge_nativeSendKey(keycode, 0, held, 0);
|
||||
{
|
||||
CGPoint location = [sender locationInView:self.view];
|
||||
if (sender.state == UIGestureRecognizerStateCancelled || sender.state == UIGestureRecognizerStateEnded) {
|
||||
[self executebtn_up:nil];
|
||||
[self executebtn_up:self.swipingButton];
|
||||
return;
|
||||
}
|
||||
for (ControlButton *button in self.swipeableButtons) {
|
||||
@@ -781,7 +781,7 @@ CallbackBridge_nativeSendKey(keycode, 0, held, 0);
|
||||
|
||||
- (void)executebtn_up:(ControlButton *)sender
|
||||
{
|
||||
if (self.swipingButton) {
|
||||
if (self.swipingButton == sender) {
|
||||
[self executebtn:self.swipingButton withAction:ACTION_UP];
|
||||
self.swipingButton = nil;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user