title: Resize a UIView inside a stackview
body: <p>I need help to accomplish this:</p>
  <ol>
  <li>Its a group of 3 photos. The first photo is the button screen before the click, the second photo is the screen after the click and the third photo is the way i've designed in the IB using stackview
  <img src="https://i.stack.imgur.com/5wEE9.png" alt="screenshot" /></li>
  </ol>
  <p>I've being trying to create this and this is the result i've got so far. I still haven't created anything as the <strong>After button click</strong> image shows because of this:</p>
  <ol>
  <li><p>My Result now</p>
  <p><img src="https://i.stack.imgur.com/lfbHt.gif" alt="Screenshot" /></p>
  </li>
  </ol>
  <p>As you can see in the gif when i press the button, the <strong>UIView height constraint.constant</strong> is set to a higher value and the UIView get higher. All i want is the stripped background to get higher as well.</p>
  <p>This is the way the view is disposed in IB.</p>
  <p>And finally, this is the way i've coded</p>
  <hr />
  <pre><code>    class LetterScreenViewController: UIViewController, ResizeWordViewDelegate {
      
      @IBOutlet weak var youTubeView: YouTubeView!
      @IBOutlet weak var phonemeView: PhonemeView!
      @IBOutlet weak var wordView: WordView!
      
      var letterPresenter: LetterPresenter?
      
      @IBOutlet weak var heightWordViewConstraint: NSLayoutConstraint!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          delegateWordObj()
          if let presenter = letterPresenter {
              presenter.setupView()
          }
      }
      
      @IBAction func dismissLetter(_ sender: Any) {
          dismiss(animated: true, completion: nil)
      }
      func delegateWordObj() {
          wordView.resizeWordViewDelegate = self
      }
      func didPressButton() {
          if heightWordViewConstraint.constant &lt;= 0 {
              heightWordViewConstraint.constant = 30
          }else{
              heightWordViewConstraint.constant = 0
          }
      }
  }
  </code></pre>
  <hr />
  <pre><code>import UIKit
  protocol ResizeWordViewDelegate {
      func didPressButton()
  }
  class WordView: UIView {
      
      @IBOutlet weak var backgroundListras: UIImageView!
      @IBOutlet var WordView: UIView!
      
      @IBOutlet weak var showWordButton: UIButton!
      
      var resizeWordViewDelegate: ResizeWordViewDelegate!
          
      override init(frame: CGRect) {
          super.init(frame: frame)
          xibInit()
      }
      
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          xibInit()
      }
      
      
      func xibInit() {
          Bundle.main.loadNibNamed(&quot;WordView&quot;, owner: self, options: nil)
          addSubview(WordView)
          WordView.frame = self.bounds
          WordView.round(corners: [.topLeft,.topRight], radius: 120)
          WordView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
      }
      
      @IBAction func showWordButtonAction(_ sender: Any) {
          resizeWordViewDelegate.didPressButton()
          self.frame.size = CGSize(width: 375, height: 200)
          self.backgroundListras.frame.size = CGSize(width: 375, height: 200)
      }
  
  }
  </code></pre>
  <p>I want to know a way to resize this UIView with all the content in it. After finding a solution to increase the height i'll be able to put all the others components shown when <strong>i press the button</strong>.</p>