public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath) { if (indexPath.Section == 0) { SellArticleButtonViewCell cell = collectionView.DequeueReusableCell(SellArticleButtonViewCell.Key, indexPath) as SellArticleButtonViewCell ?? SellArticleButtonViewCell.Create(); cell.AdjustIconAspect(); return(cell); } else { SaleItemViewCell cell = collectionView.DequeueReusableCell(SaleItemViewCell.Key, indexPath) as SaleItemViewCell ?? SaleItemViewCell.Create(); cell.Bind(Items.ElementAt(indexPath.Row)); return(cell); } }
public static SaleItemViewCell Create() { SaleItemViewCell cell = (SaleItemViewCell)Nib.Instantiate(null, null)[0]; return(cell); }