     layer.setAffineTransform(CGAffineTransform(scaleX: -1, y: 1))
   }
 
-}
+  func addSubview(_ subviews: UIView,
+                  constrainedTo anchorView: UIView) {
+    addSubview(subviews)
+    subviews.usesAutoLayout(true)
+
+    NSLayoutConstraint.activate([
+      subviews.centerXAnchor.constraint(equalTo: anchorView.centerXAnchor),
+      subviews.centerYAnchor.constraint(equalTo: anchorView.centerYAnchor),
+      subviews.widthAnchor.constraint(equalTo:  anchorView.widthAnchor),
+      subviews.heightAnchor.constraint(equalTo: anchorView.heightAnchor)])
+
+  }
+
+}
+

    return titleLabel
  }
  
  private func initMessage() -> UILabel {
    let messageLabel = UILabel()
    messageLabel.numberOfLines = 0
    messageLabel.usesAutoLayout(true)
    addSubview(messageLabel)
    
    if let message = message {
      let attributes: [NSAttributedString.Key: Any] = [
        .font : messageFont,

    }
    return messageLabel
  }

  private func makeTextStackView(with titleLabel: UILabel, messageLabel: UILabel) -> UIStackView {

    let isTitleEmpty = title?.isEmpty ?? true
    let isMessageEmpty = message?.isEmpty ?? true

    let stackView = UIStackView()
    if !isTitleEmpty {
      stackView.addArrangedSubview(titleLabel)
    }
    if !isMessageEmpty {
      stackView.addArrangedSubview(messageLabel)
    }

    stackView.usesAutoLayout(true)
    stackView.axis = .vertical
    stackView.spacing = 1
    stackView.distribution = .fill
    return stackView
  }
  
  required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
