   open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
     
     if size.height < size.width {
-      self.alertViewHeight?.constant = size.height - 40
+      alertViewHeight?.constant = size.height - 40
       iconHeightConstraint?.constant = 0
     } else {
-      self.alertViewHeight?.constant = size.height - 80
+      alertViewHeight?.constant = size.height - 80
       iconHeightConstraint?.constant = Dimension.iconHeight
     }
     
-    // this is wrong
-//    self.alertViewHeight?.constant = size.height - 40
-//    alertViewWidth?.constant = Dimension.width
-
-    
+    alertViewWidth?.constant = Dimension.width(from: size)
     
     UIView.animate(withDuration: 0.3) {
-      //self.alertView.updateConstraints()
-      self.alertView.layoutIfNeeded()
+      self.alertView.updateConstraints()
     }
   }
 }

    textview.isScrollEnabled = false
    textview.isSelectable = false
    textview.bounces = false
    textview.setContentCompressionResistancePriority(UILayoutPriority.defaultHigh, for: .vertical)
    
    return textview
  }()


// MARK: - EMAlerView Dimensions
enum Dimension {
  static let padding: CGFloat = 15.0
  static let buttonHeight: CGFloat = 50.0
  static let iconHeight: CGFloat = 100.0
  static let textFieldHeight: CGFloat = 30.0
  
  static func width(from size: CGSize) -> CGFloat {
    return (size.width <= 414) ? size.width - 60 : 280
  }
}

open class EMAlertController: UIViewController {
