title: UITableViewCell autolayout
body: <p>I have a problem with autolayout. I have a <code>UITableViewCell</code> and a view inside. I want this view to be smaller than the cell so I've added constraints: </p>
  
  <ul>
  <li>Vertical space (10) top </li>
  <li>Vertical space (10) bottom</li>
  <li>Horizontal space (10) leading space</li>
  <li>Horizontal space (10) trailing space</li>
  </ul>
  
  <p>When tableView appears the cell is displayed good, but then if I scroll down the tableView and scroll back up, the View in the cell is resized and now takes full space in the cell.</p>
  
  <p>Correct cell:
  <img src="https://i.stack.imgur.com/nHJX1.png" alt="enter image description here"></p>
  
  <p>Incorrect cell (after scroll)
  <img src="https://i.stack.imgur.com/ATxXM.png" alt="enter image description here"></p>
  
  <p>I've already searched for this, but couldn't find anything similar.
  I think this person had the same problem, but there's no answer:
  <a href="https://stackoverflow.com/questions/13854485/auto-layout-of-custom-programmatic-uitableviewcell-fails-upon-scrolling" title="Similar problem">Similar problem</a></p>
  
  <p>Thanks for any help in advance!</p>