         }
         
         currentController = viewController
-        orientation = UIDevice.currentDevice().orientation
-        originalCurrentControllerFrame = viewController.view.frame
         
         if let navigationController = HMViewControllerManager.sharedInstance.navigationController {
             doneCellAnimations =  false

    // MARK: - Rotation Methods
    
    @objc private func didRotate (notification: NSNotification ) {
        let orientation = UIDevice.currentDevice().orientation
        currentController?.view.transform  = CGAffineTransformScale(CGAffineTransformIdentity, 1.0, 1.0)
        if UIDevice.currentDevice().userInterfaceIdiom == .Phone {
            if ((self.orientation == .Portrait &&
                (orientation == .PortraitUpsideDown ||
                    orientation == .LandscapeLeft ||
                    orientation == .LandscapeRight)) ||
                (orientation == .Portrait &&
                    (self.orientation == .PortraitUpsideDown ||
                        self.orientation == .LandscapeLeft ||
                        self.orientation == .LandscapeRight))) {
                            if let frame = originalCurrentControllerFrame {
                                currentController?.view.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.height, frame.size.width)
                            }
            } else {
                currentController?.view.frame = originalCurrentControllerFrame!
            }
        } else {
            if (((self.orientation == .Portrait ||
                self.orientation == .PortraitUpsideDown) &&
                (orientation == .LandscapeLeft ||
                    orientation == .LandscapeRight)) ||
                ((orientation == .Portrait ||
                    orientation == .PortraitUpsideDown) &&
                    (self.orientation == .LandscapeLeft ||
                        self.orientation == .LandscapeRight))) {
                            if let frame = originalCurrentControllerFrame {
                                currentController?.view.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.height, frame.size.width)
                            }
            } else {
                currentController?.view.frame = originalCurrentControllerFrame!
            }
        }
        currentController?.view.transform  = CGAffineTransformScale(CGAffineTransformIdentity, 0.6, 0.6)
        
        if containerViewWidthConstraint != nil {

        }
        
        updateButtonConstraint()
        
        tableView.setContentOffset(CGPointMake(0, 0), animated: false)
    }
    
