title: How can we set constraints programatically for dynamically added view on UITableViewCell
body: <p>I want to add constraints during the run time between the dynamically added view.</p>
  
  <p>I have set the constraints but still m getting problems for message label which displays height more then required height.
  Attached screen please check.
  <a href="https://i.stack.imgur.com/JgpVb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JgpVb.png" alt="enter image description here"></a></p>
  
  <p>Here i want label height according to its text.</p>
  
  <p>i have set auto-layout constraints between message label and this image attachment collectionView.
  UILabel has height constraints of greater then or equal heights same constraints on image attachment collectionview.</p>
  
  <p>Please help if you got proper understanding.</p>