         }
     }
     
+    /**
+    Long press handler - animates the view (zoom in and out to signal change of its state) and then 'releases' the view to drag around. When drag has been finished, delegate method didDrop gets called to handle next steps.
+    
+    :param: sender The long press gesture that is created when draggable flag is set to true.
+    */
     func handleLongPress(sender: UILongPressGestureRecognizer) {
         if self.viewWithTag(T2GViewTags.checkboxButton.rawValue) == nil {
             if sender.state == UIGestureRecognizerState.Began {
                 self.superview?.bringSubviewToFront(self)
                 self.origin = self.frame.origin
-                
                 self.lastDraggedLocation = sender.locationInView(self.superview)
                 
                 UIView.animateWithDuration(0.2, animations: { () -> Void in
                     let transform = CGAffineTransformMakeScale(1.1, 1.1)
                     self.transform = transform
+                }, completion: { (_) -> Void in
+                    UIView.animateWithDuration(0.2, animations: { () -> Void in
+                        let transform = CGAffineTransformMakeScale(1.0, 1.0)
+                        self.transform = transform
                     }, completion: { (_) -> Void in
-                        UIView.animateWithDuration(0.2, animations: { () -> Void in
-                            let transform = CGAffineTransformMakeScale(1.0, 1.0)
-                            self.transform = transform
-                            }, completion: { (_) -> Void in
-                                // Long press activated
-                        })
+                        // Long press activated
+                    })
                 })
             }
             
             if sender.state == UIGestureRecognizerState.Changed {
-                
                 let point = sender.locationInView(self.superview)
                 var center = self.center
                 center.x = (center.x + (point.x - self.lastDraggedLocation.x))
                 center.y = (center.y + (point.y - self.lastDraggedLocation.y))
                 self.center = center
-                
                 self.lastDraggedLocation = point
-                
                 self.draggableDelegate?.didMove(self.tag, frame: self.frame)
             }
             


import UIKit

protocol T2GDragAndDropOwnerDelegate {
    func addGestureRecognizerToView(recognizer: UILongPressGestureRecognizer)
}

protocol T2GDragAndDropDelegate {
    func didMove(tag: Int, frame: CGRect)
    func didDrop(cell: T2GDragAndDropView)
}

class T2GDragAndDropView: UIView {
    var ownerDelegate: T2GDragAndDropOwnerDelegate?
    var draggableDelegate: T2GDragAndDropDelegate?

    var lastDraggedLocation:CGPoint = CGPointMake(0, 0)
    var origin:CGPoint = CGPointMake(0, 0)
    
    /// Activating flag for drag and drop
    var draggable: Bool = false {
        didSet {
            if draggable {
