title: Change UIView height with respect to UITableview
body: <p>I have a View named AlarmView and a tableview named alarmtableview inside AlarmView , also I have a textfield 
  Now What I want is when a user enters any number in textfield , tableview will be reloaded with number of rows equal to that number entered by the user.
  I have set the AlarmView height as 0 initially , so that when the textfield is empty AlarmView remains invisible from the users.
  And after reloading the alarmtableview , I am updating the detailview's  height  equal to tableview's height.
  But when I run the app the view's height is not updated. it remains invisible from the users even after reloading the tableview</p>
  
  <p>Below Is the code I have written to achieve the same </p>
  
  <pre><code>@IBOutlet weak var AlarmViewHeightConstraint: NSLayoutConstraint!
  @IBOutlet weak var AlarmView: UIView!
  @IBOutlet weak var AlarmTableView: UITableView!
  @IBOutlet weak var FrequencyField: CustomUITextField!
  
  
  func textFieldDidEndEditing(textField: UITextField) {
  
      print("textFieldDidEndEditing called")
      if textField === FrequencyField{
          self.AlarmToggleAction(self.AlarmSwitch)
      }
  }
  //MARK: ALARM Actions
  @IBAction func AlarmToggleAction(sender: UISwitch) {
      if sender.on{
          if let count = Int(self.FrequencyField.text!) {
              print("ON state")
              alarmCount = count
              AlarmTableView.reloadData()
  
              print("AlarmTableView.frame.height : \(AlarmTableView.frame.height)")
              AlarmViewHeightConstraint.constant = AlarmTableView.frame.height
          }
      }
      else{
          print("OFF state")
          alarmCount = 0
          //AlarmTableView.reloadData()
          //AlarmViewHeightConstraint.constant = 0
  
      }
  
  
  }
  
  //MARK: Tableview Actions
  func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      return 1
  
  }
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      print("numberOfRowsInSection called alarmCount : \(alarmCount)")
  
      return alarmCount
  }
  
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
     print("cellForRowAtIndexPath called")
          let cell = tableView.dequeueReusableCellWithIdentifier("AlarmCell") as! AlarmCell
          cell.TimeLabel.text = "Alarm \(indexPath.row + 1)"
          cell.TimeField.tag = indexPath.row
  
          cell.TimeSwitch.tag = indexPath.row
  
          return cell
  }
  </code></pre>
  
  <p>Please help me out of this problem.
  Thanks in advance</p>