title: TableView only loading contents of one cell as I scroll
body: <p>I'm loading UIViews into my tableview cells content view but as I scroll through my tableview, only one cell loads its view. Its loading the correct view for each cell but it only loads one and then disappears as a new cell appears from the bottom. All of the data is loaded locally via a function <code>makeTableViewRowView</code> (an array of strings that populates the uiview).</p>
  
  <pre><code> override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: expenseCell, for: indexPath)
          tableViewRow = makeTableViewRowView(indexPath: indexPath)
          tableViewRow.translatesAutoresizingMaskIntoConstraints = false
          cell.contentView.addSubview(tableViewRow)
          cell.selectionStyle = .none
  
          let margins = cell.contentView.layoutMarginsGuide
          tableViewRow.centerYAnchor.constraint(equalTo: margins.centerYAnchor).isActive = true
          tableViewRow.leadingAnchor.constraint(equalTo: margins.leadingAnchor).isActive = true
          tableViewRow.trailingAnchor.constraint(equalTo: margins.trailingAnchor).isActive = true
          tableViewRow.heightAnchor.constraint(equalToConstant: 40).isActive = true
          return cell
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/RVDsG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RVDsG.png" alt="broken tableView"></a></p>