title: Xamarin.iOS native - Resizing UITableView after Content. ContentHeight is always 0
body: <p>I have been following this guide: <a href="https://stackoverflow.com/questions/2595118/resizing-uitableview-to-fit-content/48623673#48623673">Resizing UITableView to fit content</a> in order for the UiTableView to adjust its height after its content.</p>
  <p>In the ViewDidLoad() method, I am filling my uiTable so it has 3 rows. So the content height should not be 0.</p>
  <p>Do you have any ideas of what could be wrong?</p>
  <p>This is my class:</p>
  <pre><code>public partial class ContentSizedTableView : UITableView
  {
      public ContentSizedTableView(IntPtr handle) : base(handle)
      {
      }   
  
      public override CGSize ContentSize { get =&gt; base.ContentSize; set =&gt; InvalidateIntrinsicContentSize(); }
  
      public override CGSize IntrinsicContentSize
      {
          get
          {
              LayoutIfNeeded();
              return new CGSize(NoIntrinsicMetric, ContentSize.Height);
          }
      }
  }
  </code></pre>