From 02aa6cdf85b91936b3c50595b51b90bede738ae1 Mon Sep 17 00:00:00 2001 From: Cem Olcay Date: Tue, 16 Dec 2014 13:50:37 +0200 Subject: [PATCH] long press when toggle on fix --- BubbleControl-Swift/BubbleControl.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/BubbleControl-Swift/BubbleControl.swift b/BubbleControl-Swift/BubbleControl.swift index 810a5bc..aceab56 100644 --- a/BubbleControl-Swift/BubbleControl.swift +++ b/BubbleControl-Swift/BubbleControl.swift @@ -512,18 +512,17 @@ class BubbleControl: UIControl { func longPressHandler (press: UILongPressGestureRecognizer) { + if toggle { + return + } + switch press.state { case .Began: pop() - if toggle { - toggle = !toggle - } - case .Ended: if bubbleState == .Pop { cancelPop() } - default: return }