         }
     }
     
+    func cancelLongPressCheck() {
+        if checkLongPress != nil {
+            if !checkLongPress!.isCancelled {
+                checkLongPress!.cancel()
+            }
+        }
+    }
+    
     func confimCurIndex(_ index: Int) {
-        delegate.indexConfirmed(index: index)
-//        if checkLongPress != nil {
-//            if !checkLongPress!.isCancelled {
-//                checkLongPress!.cancel()
-//            }
-//        }
-    }
-
-}
+        if(index == curIndex) {
+            delegate.indexConfirmed(index: index)
+        }
+    }
+
+}

    }
    
    func insertLabel() {
        index += 1
        guard index < max else {
            return
        }
        UIView.animate(withDuration: 0.3, animations: {
            self.frame = CGRect(x: 0, y: 0, width: self.labelSize.width * CGFloat(self.index + 1), height: self.frame.height)
            self.center = self.superview!.center

    override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
        delegate.hudView.isHidden = true
        delegate.hudView.resetHud()
        cancelLongPressCheck()
    }
    
    override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
        delegate.hudView.isHidden = true
        delegate.hudView.resetHud()
        cancelLongPressCheck()
    }
    
    func updateIndex(_ index: Int) {
