             deleteButton.addTarget(self, action: "deleteButtonPressed:", forControlEvents: UIControlEvents.TouchUpInside)
             deleteButton.alpha = 0.0
             view.addSubview(deleteButton)
+            deleteButton.translatesAutoresizingMaskIntoConstraints = true
+            deleteButton.autoresizingMask = [.FlexibleBottomMargin, .FlexibleLeftMargin, .FlexibleRightMargin, .FlexibleTopMargin]
         }
     }
     

        //                }
        //            }
        //        }
        setControlsHidden(false, animated: false, permanent: false)
    }
    
    // FIXME: - Maybe it will be needed in the future

    
    // MARK: - device rotation
    @objc private func changeOrientation() {
        //        setControlsHidden(true, animated: false, permanent: false)
        //        deleteButtonShowFrame = CGRect(x: view.frame.width - 44, y: 5, width: 44, height: 44)
        //        deleteButtonHideFrame = CGRect(x: view.frame.width - 44, y: -20, width: 44, height: 44)
        //        if displayCustomCloseButton == true {
        //            if customCloseButtonShowFrame != nil && customCloseButtonHideFrame != nil {
        //                if customCloseButtonConstraints == nil {
