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

        
        layoutContainer()
        layoutContents()
        layoutButtons()
        
        let margin = marginInsets.top + marginInsets.bottom
        let backgroundViewHeight = view.bounds.size.height - backgroundViewBottomSpaceConstraint.constant - margin

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