void UpdateDefaultSupplementaryView(DefaultCell cell, NSString elementKind, NSIndexPath indexPath) { cell.Label.Text = ItemsSource.Group(indexPath).ToString(); if (cell is ItemsViewCell) { cell.ConstrainTo(ItemsViewLayout.ConstrainedDimension); } }
protected virtual void UpdateDefaultCell(DefaultCell cell, NSIndexPath indexPath) { cell.Label.Text = ItemsSource[indexPath].ToString(); if (cell is ItemsViewCell constrainedCell) { ItemsViewLayout.PrepareCellForLayout(constrainedCell); } }
CGSize MeasureDefaultSupplementaryCell(NSString elementKind, nint section, NSString reuseId) { if (_measurementCellDefault == null) { if (reuseId == HorizontalDefaultSupplementalView.ReuseId) { _measurementCellDefault = new HorizontalDefaultSupplementalView(CGRect.Empty); } else if (reuseId == VerticalDefaultSupplementalView.ReuseId) { _measurementCellDefault = new VerticalDefaultSupplementalView(CGRect.Empty); } } if (_measurementCellDefault == null) { return(CGSize.Empty); } UpdateDefaultSupplementaryView(_measurementCellDefault, elementKind, NSIndexPath.FromItemSection(0, section)); return(_measurementCellDefault.Measure()); }