public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { //None custom cell //UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier) as UITableViewCell; //if (cell == null) //{ // cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier); //} //var hotDog = hotDogs[indexPath.Row]; //cell.TextLabel.Text = hotDog.Name; //cell.ImageView.Image = UIImage.FromFile("Images/hotdog" + hotDog.HotDogId + ".jpg"); //return cell; //Custom cell implementation HotDogListCell cell = tableView.DequeueReusableCell(cellIdentifier) as HotDogListCell; if (cell == null) { cell = new HotDogListCell(cellIdentifier); } cell.UpdateCell(hotDogs[indexPath.Row].Name , hotDogs[indexPath.Row].Price.ToString() , UIImage.FromFile("Images/hotdog" + hotDogs[indexPath.Row].HotDogId + ".jpg")); return(cell); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { HotDogListCell cell = tableView.DequeueReusableCell(_cellIdentifier) as HotDogListCell; if (cell == null) { cell = new HotDogListCell(_cellIdentifier); } cell.UpdateCell(_hotDogs[indexPath.Row].Name, _hotDogs[indexPath.Row].Price.ToString(), UIImage.FromFile($"Images/hotdog{_hotDogs[indexPath.Row].HotDogId}.png")); return(cell); }