title: Can't change size of view programatically
body: <p>I have a <code>UIButton</code> and I try to change it's size programmatically but it just has not effect.
  This is what I wrote:</p>
  
  <pre><code>import UIKit
  
  class HomeVC: UIViewController {
  
  let addGroupBtn = UIButton(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
  let addGroupLabel = UILabel()
  
  override func viewDidLoad() {
      super.viewDidLoad()
      view.backgroundColor = UIColor(red: 110/255, green: 178/255, blue: 87/255, alpha: 1.0)
      setAddGroupBtn()
  }
  
  func setAddGroupBtn(){
      addGroupBtn.setImage(UIImage(named: "addIcon"), for: .normal)
      addGroupBtn.addTarget(self, action: #selector(moveToAddGroup), for: .touchUpInside)
      addGroupBtn.translatesAutoresizingMaskIntoConstraints = false
  
      self.view.addSubview(addGroupBtn)
  
      addGroupBtn.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor, constant: 50).isActive = true
      addGroupBtn.leadingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.leadingAnchor, constant: 14).isActive = true
  }
  
  func setAddGroupLabel(){
      addGroupLabel.translatesAutoresizingMaskIntoConstraints = false
      addGroupLabel.text = "Add Group"
  }
  
  @objc func moveToAddGroup(){
      print("ADD GROUP")
      //Move to another VC
  }
  }
  </code></pre>
  
  <p>I tried few different solutions I saw here on Stackoverflow and other places, but nothing works. It always stays like this:
  <a href="https://i.stack.imgur.com/WECaS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WECaS.png" alt="enter image description here"></a></p>