title: CollectionView cell height is not automatically resizing
body: <p>So I am encountering some issues with a UICollectionView I have in my Xamarin iOS project. </p>
  
  <p>The cells for the CollectionView are not expanding with the label in them. The label in the cell has <strong>lines</strong> set to 0 and the following constraints: </p>
  
  <ul>
  <li><p>(top, bottom, leading, trailing) to superview </p></li>
  <li><p>Height >= 10</p></li>
  </ul>
  
  <p>In my <strong>ViewDidLoad()</strong> I setup the CollectionView as follows:</p>
  
  <pre><code>var source = new CustomCollectionViewSource(collectionView);
          collectionView.Source = source;
          collectionView.SetCollectionViewLayout(new UICollectionViewFlowLayout()
          {
              ScrollDirection = UICollectionViewScrollDirection.Vertical,
              EstimatedItemSize = new CGSize(collectionView.Frame.Width, 10)
          }, false);
  
          var set = this.CreateBindingSet&lt;MainViewController, MainViewModel&gt;();
          set.Bind(source).For(v =&gt; v.ItemsSource).To(vm =&gt; vm.DataSource);
          set.Apply();
  </code></pre>
  
  <p>and my <strong>CollectionViewSource</strong></p>
  
  <pre><code> public class CustomCollectionViewSource : MvxCollectionViewSource
  {
      public IList&lt;Item&gt; Messages { get; set; }
  
      public override void ReloadData()
      {
          var list = (ItemsSource as IEnumerable&lt;Item&gt;).ToArray();
          Messages = list;
      }
  
      public CustomCollectionViewSource(UICollectionView collectionView) : base(collectionView)
      {
          collectionView.RegisterNibForCell(CustomCollectionViewCell.Nib, CustomCollectionViewCell.Key);
      }
  
      public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
      {
          var cell = collectionView.DequeueReusableCell(CustomCollectionViewCell.Key, indexPath) as CustomCollectionViewCell;
          cell.DataContext = Messages.ElementAtOrDefault(indexPath.Row);
  
          return cell;
      }
  }
  </code></pre>
  
  <p>I am trying to have the cells be the width of the collection view and for the height to be flexible; however, whenever I populate the cells, I always get something like this: <a href="https://i.stack.imgur.com/7hA9g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7hA9g.png" alt="UICollectionView Cells that are cutoff"></a><a href="https://i.stack.imgur.com/GY6wi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GY6wi.png" alt="enter image description here"></a>
  The cells are cutoff and have an ellipses at the end. I've read online that the constraints must be right to dynamically resize, so is there something I'm missing? </p>
  
  <p>I also read that to get a calculated height for each cell I can load the nib of the cell, populate it, then set the size manually in a custom UICollectionViewDelegate. Cool idea, but I could find any working examples for Xamarin iOS. </p>
  
  <p>Please let me know if there is something I'm missing or any other info you require. Thanks in advance!</p>