public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { // Ask for a cached cell that's been moved off the screen that we can therefore repurpose for a new cell coming onto the screen. RecipeTableViewCell cell = tableView.DequeueReusableCell(RecipeCellId) as RecipeTableViewCell; // If no cached cells are available, create one. Depending on your table row height, we only need to create enough to fill one screen. // After that, the above call will start working to give us the cell that got scrolled off the screen. if (cell == null) { cell = new RecipeTableViewCell(UITableViewCellStyle.Default, RecipeCellId); } // Provide to the cell its corresponding recipe depending on the argument row cell.Recipe = Recipes[indexPath.Row]; // Right arrow-looking indicator on the right side of the table view cell cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return(cell); }
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { // Ask for a cached cell that's been moved off the screen that we can therefore repurpose for a new cell coming onto the screen. RecipeTableViewCell cell = tableView.DequeueReusableCell (RecipeCellId) as RecipeTableViewCell; // If no cached cells are available, create one. Depending on your table row height, we only need to create enough to fill one screen. // After that, the above call will start working to give us the cell that got scrolled off the screen. if (cell == null) cell = new RecipeTableViewCell (UITableViewCellStyle.Default, RecipeCellId); // Provide to the cell its corresponding recipe depending on the argument row cell.Recipe = Recipes[indexPath.Row]; // Right arrow-looking indicator on the right side of the table view cell cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return cell; }