title: How to programmatically increase the height of UIView with Swift
body: <p>Inside IB I have a viewController with a segmentedControl and 2 containerViews. In each containerView I have a tableView. From each tableView I push on a detailView. My auto layout is in IB.</p>
  
  <p>Once I pick a segment, I see the corresponding tableView, I pick a cell and the correct detailView gets pushed on the scene. </p>
  
  <p>The issue is once the detailView gets pushed on the segmentedControl is still visible. I decided to hide the segmentedControl which works but there is a big empty space there. I tried to programmatically increase the size of detailView's view but it's not expanding. From what I read it's because I made the initial constraints in storyboards.</p>
  
  <p><strong>How to I programmatically get the detailView's view to expand?</strong></p>
  
  <p>code:</p>
  
  <pre><code>DetailViewController: UIViewController{
  
  override func viewDidLoad() {
          super.viewDidLoad()
  
   //this isn't increasing the view's size
   self.view.frame.size.height += 20.0
  
   //doesn't work. I get an error on the last argument
   self.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height += 20.0)
  
   //doesn't work. I get an error on the last argument
   self.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.size.height += 20.0)
   }
  
  }
  </code></pre>
  
  <p>Errors:</p>
  
  <pre><code>//Error for the last argument- height: *self.view.frame.height += 20.0*
  self.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height += 20.0)
  </code></pre>
  
  <blockquote>
    <p>Left side of mutating operator isn't mutable: 'height' is a get-only
    property</p>
  </blockquote>
  
  <pre><code>//Error for the last argument- *self.view.frame.size.height += 20.0*:
  self.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.size.height += 20.0)
  </code></pre>
  
  <blockquote>
    <p>Cannot invoke initializer for type 'CGRect' with an argument list of
    type '(x: Int, y: Int, width: CGFloat, height: ())'</p>
  </blockquote>