title: Updating Scrolling of a static tableView
body: <p>I am trying to get the scrollview of a uitableview that is static to get updated, I have a container view that will change sizes, and that works, but i cannot get the scrollable area to update.</p>
  
  <p>I have tried setNeedsDisplay and setNeedsLayout and no luck.</p>
  
  <p>Any ideas?</p>
  
  <pre><code>class TimeAwayRequestTableViewController: UITableViewController {
  
  var originalHeight : CGFloat!
  
  @IBOutlet var selectedDate : UIView!
  
  @IBOutlet var calendarView: CalendarView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      originalHeight = self.tableView.contentSize.height
  
      calendarView.delegate = self
  
      self.selectedDate.frame.size.height = CGFloat(SelectedDatesTimeAway.selectedDates.count * 44)
  }
  
  override func preferredContentSizeDidChangeForChildContentContainer(container: UIContentContainer) {
      self.selectedDate.frame.size.height = CGFloat(SelectedDatesTimeAway.selectedDates.count * 44)
      self.tableView.contentSize.height = self.originalHeight + self.selectedDate.frame.size.height
      self.tableView.setNeedsDisplay()
      self.tableView.setNeedsLayout()
  }
  
  }
  
  extension TimeAwayRequestTableViewController : CalendarViewDelegate {
  
  func calendarDidSelectDate(date: Moment) {
      let theDate = date.date
      SelectedDatesTimeAway.selectedDates.append(theDate)
      print(SelectedDatesTimeAway.selectedDates.count)
      let tbc = self.childViewControllers[0] as! UITableViewController
      tbc.preferredContentSize.height = CGFloat ( SelectedDatesTimeAway.selectedDates.count * 44 )
      print(tbc.preferredContentSize.height)
      tbc.tableView.reloadData()
  }
  
  func calendarDidPageToDate(date: Moment) {
      print(date)
  }
  
  }
  </code></pre>