         currentState = .Displaying
 
         let duration = Double((viewCenterY - contentController!.view.center.y) / velocity)
-        UIView.animateWithDuration(duration, animations: { [unowned self] in
+        UIView.animateWithDuration(duration, animations: {
             if let center = self.contentController?.view.center {
                 self.contentController?.view.center = CGPointMake(center.x, viewCenterY)
             }
-            
-        }, completion: { [unowned self] finished in
+        }, completion: { _ in
             self.currentState = .Shown
         })
     }

        if currentState == .Shown { return }

        if let x = contentController?.view.center.x {
            
            if animated {
                UIView.animateWithDuration(0.2, animations: { [unowned self] in
                    self.contentController?.view.center = CGPointMake(x, UIScreen.mainScreen().bounds.size.height/2 + self.height)
                    
                }, completion: { [unowned self] finished -> Void in
                    UIView.animateWithDuration(0.2, animations: { [unowned self] in
                        self.contentController?.view.center = CGPointMake(x, UIScreen.mainScreen().bounds.size.height/2 + self.height - self.bounceOffset)

                    }, completion: { [unowned self] finished in
                        self.currentState = .Shown
                        completion?()
                    })
                })
                
            } else {
                self.contentController?.view.center = CGPointMake(x, UIScreen.mainScreen().bounds.size.height/2 + self.height)
                self.currentState = .Shown
                completion?()
            }
            
        }
    }
    
    public func closeWithCompletion(animated animated:Bool, completion: completionHandler?) {
        if let center = contentController?.view.center {
            
            if animated {

                UIView.animateWithDuration(0.2, animations: { [unowned self] in
                    self.contentController?.view.center = CGPointMake(center.x, center.y + self.bounceOffset)
                    
                }, completion: { [unowned self] finished -> Void in
                    UIView.animateWithDuration(0.2, animations: { [unowned self] in
                        self.contentController?.view.center = CGPointMake(center.x, UIScreen.mainScreen().bounds.size.height/2)

                    }, completion: { finished in
                        self.currentState = .Closed
                        completion?()
                    })
                })

            } else {
                contentController?.view.center = CGPointMake(center.x, UIScreen.mainScreen().bounds.size.height/2)
                currentState = .Closed

    public var heightForRowAtIndexPath: CGFloat = 57
    public var heightForHeaderInSection: CGFloat = 30
    public var enabled: Bool = true
    public var animationDuration: NSTimeInterval = 0.2

    public var items: [MediumMenuItem] = []

