title: Error when changing the height value of a constraint
body: <p>In my code I am changing the height constraint that was linked through a Ib Outlet "collectionViewHeightConstraint"</p>
  
  <p>Whenever I run the app errors pop up stating that there's conflicting constraints. I tried to call <code>setNeedsUpdateConstraints()</code> but nothing really changes.</p>
  
  <p>Ironically, the error is only called when the first three cells are initialized. However if I take out the <code>setNeedsUpdateConstraints()</code>, then the errors pop up whenever I scroll the tableview.</p>
  
  <pre><code>class MonthWeekTableViewCell: UITableViewCell, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
  
  @IBOutlet weak var monthLabel: UILabel!
  @IBOutlet weak var dayCollectionView: UICollectionView!
  
  @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint!
  
  var monthYear: (String,String) = ("","") {
      didSet {
  
          monthLabel.text = self.monthYear.0
  
          guard let _maxDate = DateFormat.returnNumberOfDaysInMonth(month: self.monthYear.0, year: self.monthYear.1) else {fatalError("Tuple Error")}
          maxDate = _maxDate
  
          firstDay = DateFormat.getFirstOfMonth(year: self.monthYear.1, month: self.monthYear.0)
  
          let extra = maxDate - 36 + firstDay
  
          if extra &gt; 0 {
              extraCalendarItem = extra
          } else if extra &lt;= -7 {
              setNeedsUpdateConstraints()
              collectionViewHeightConstraint.constant = 270
  
          }
      }
  }
  var firstDay: Int = 0 {
      didSet {
  
          dayCollectionView.reloadData()
      }
  }
  
  var extraCalendarItem: Int = 0 {
      didSet {
  
          setNeedsUpdateConstraints()
          collectionViewHeightConstraint.constant = 270
      }
  }
  
  var dayNumber: Int = 1
  
  var maxDate: Int = 30
  
  override func awakeFromNib() {
      super.awakeFromNib()
  
      dayCollectionView.delegate = self
      dayCollectionView.dataSource = self
      dayCollectionView.register(UINib(nibName: "DayCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "DayCollectionViewCell")
      dayCollectionView.translatesAutoresizingMaskIntoConstraints = false
  
  }
  
  func numberOfSections(in collectionView: UICollectionView) -&gt; Int {
  
      if extraCalendarItem &gt; 0 {
          return 6
      }
  
      return 5
  }
  
  func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
  
      if section == 5 {
          return extraCalendarItem
      }
      return 7
  }
  
  func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
  
      let _cell = cell as! DayCollectionViewCell
      if (indexPath.section == 0 &amp;&amp; firstDay &gt; indexPath.row + 1) || dayNumber &gt; maxDate{
          _cell.isHidden = true
      } else {
          _cell.dayLabel.text = String(dayNumber)
          dayNumber += 1
          _cell.isHidden = false
      }
  }
  
  
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
      let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "DayCollectionViewCell", for: indexPath) as! DayCollectionViewCell
  
  
      return cell
  }
  
  func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {
  
      return CGSize(width: collectionView.frame.width / 7, height: 45)
  }
  
  override func prepareForReuse() {
  
      dayNumber = 1
      extraCalendarItem = 0
  
      updateConstraints()
  }
  
  override func updateConstraints() {
  
      collectionViewHeightConstraint.constant = 225
      super .updateConstraints()
  }
  
  }
  </code></pre>