title: Override tab bar changing its height
body: <p>I tried to search before but I could not find any solution to my question.
  I want to change the height of the TabBar doing an override of the old TabBar.
  I know that one possible solution is to create a UIViewController subclass and start from scratch or sottoclassare UITabBar but I wanted to try it this way and I can not understand why not work.</p>
  
  <pre><code>import UIKit
  
  class NewTabBarController: UITabBarController {
  
  let newTabBar : UITabBar = {
  
      let tmpView = UITabBar.init()
      tmpView.backgroundColor = UIColor.black
      tmpView.accessibilityLabel = "Nuova Tab Bar"
      tmpView.translatesAutoresizingMaskIntoConstraints = false
  
      return tmpView
  
  }()
  
  override var tabBar: UITabBar{
  
  
      return self.newTabBar
  
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
              self.view.addSubview(newTabBar)
      self.newTabBar.heightAnchor.constraint(equalToConstant: 100).isActive = true
      self.newTabBar.widthAnchor.constraint(equalTo: self.view.widthAnchor).isActive = true
      self.newTabBar.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
      self.newTabBar.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true
  
      // Do any additional setup after loading the view, typically from a nib.
  }
  </code></pre>
  
  <p>I tried various solutions. 
  Using the frame, the constraint but none of these worked.
  With constraints I obtain this error </p>
  
  <pre><code> *** Terminating app due to uncaught exception
  'NSInternalInconsistencyException', reason: 'Cannot modify constraints for
  UITabBar managed by a controller'
  </code></pre>
  
  <p>Using frame instead :</p>
  
  <pre><code>var newTabBar : UITabBar = {
  
      let tmpView = UITabBar.init()
      tmpView.backgroundColor = UIColor.black
      tmpView.accessibilityLabel = "New Bar"
      return tmpView
  
  }()
  
  override var tabBar: UITabBar{
  
  
      return self.newTabBar
  
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      self.newTabBar.frame = CGRect.init(x: 0, y: self.view.frame.height - 110, width: self.view.frame.width, height: 110)
      // Do any additional setup after loading the view, typically from a nib.
  }
  </code></pre>
  
  <p>it doesn't appear.
  If I add my newTabBar as subview, it will appear but the first doesn't disappear.</p>