             let buttonHeight = Int((button?.bounds.height)!)
             let buttonsHeight = Int(height)
             sizeToFit(button!, buttonsHeight / buttonHeight)
+            button?.layoutIfNeeded()
             
             return CGFloat(buttonsHeight + buttonHeight)
         }

        backgroundViewTopSpaceConstraint.constant = toView.bounds.height
        
        animation({
            self.backgroundView.layoutIfNeeded()
            self.transitionCoverView?.alpha = 0
            self.transitionCoverView = nil
        }, completion: completion)

        
        backgroundViewBottomSpaceConstraint.constant = -toView.bounds.height
        backgroundViewTopSpaceConstraint.constant = toView.bounds.height
        view.layoutIfNeeded()
        contentView?.layoutIfNeeded()
        backgroundViewBottomSpaceConstraint.constant = 0
        backgroundViewTopSpaceConstraint.constant = 0
        
        transitionCoverView = coverView
        
        animation({
            self.view.layoutIfNeeded()
            coverView.alpha = 1
        }, completion: completion)
    }
