title: iOS: UITableView inside UITableViewCell with dynamic cell height
body: <p>I want to implement <code>UITableView</code> inside <code>UITableViewCell</code> with dynamic height of cell according to inside <code>UITableView</code> content size. How can I implement this any suggestions?
  I want layout something like this...</p>
  
  <p><strong>Code work:</strong></p>
  
  <pre><code>func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat { 
      let identifier = "OrderHistoryTVCell" let cell: OrderHistoryTVCell! = tableView.dequeueReusableCell(withIdentifier: identifier) as? OrderHistoryTVCell 
      let tableInnerContentSize = cell.tableInner.contentSize.height 
      let nn = cell.viewAfterTable.frame.height+tableInnerContentSize 
      return nn 
  } 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/sJNUo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sJNUo.png" alt="enter image description here"></a></p>