Skip to content

Commit 02aa6cd

Browse files
Cem OlcayCem Olcay
authored andcommitted
long press when toggle on fix
1 parent 7e6a16b commit 02aa6cd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

BubbleControl-Swift/BubbleControl.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,18 +512,17 @@ class BubbleControl: UIControl {
512512

513513
func longPressHandler (press: UILongPressGestureRecognizer) {
514514

515+
if toggle {
516+
return
517+
}
518+
515519
switch press.state {
516520
case .Began:
517521
pop()
518-
if toggle {
519-
toggle = !toggle
520-
}
521-
522522
case .Ended:
523523
if bubbleState == .Pop {
524524
cancelPop()
525525
}
526-
527526
default:
528527
return
529528
}

0 commit comments

Comments
 (0)