public override UITableViewCell GetCell (Xamarin.Forms.Cell item, UITableViewCell reusableCell, UITableView tv) { var x = (NativeCell)item; Console.WriteLine (x); NativeiOSCell c = reusableCell as NativeiOSCell; if (c == null) { c = new NativeiOSCell (rid); } UIImage i = null; if (!String.IsNullOrWhiteSpace (x.ImageFilename)) { i = UIImage.FromFile ("Images/" + x.ImageFilename + ".jpg"); } c.UpdateCell (x.Name, x.Category, i); return c; }
public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) { var nativeCell = (NativeCell)item; Console.WriteLine("\t\t" + nativeCell.Name); cell = reusableCell as NativeiOSCell; if (cell == null) { cell = new NativeiOSCell(item.GetType().FullName, nativeCell); } else { cell.NativeCell.PropertyChanged -= OnNativeCellPropertyChanged; } nativeCell.PropertyChanged += OnNativeCellPropertyChanged; cell.UpdateCell(nativeCell); return(cell); }
public override UITableViewCell GetCell(Xamarin.Forms.Cell item, UITableViewCell reusableCell, UITableView tv) { var x = (NativeCell)item; Console.WriteLine(x); NativeiOSCell c = reusableCell as NativeiOSCell; if (c == null) { c = new NativeiOSCell(rid); } UIImage i = null; if (!String.IsNullOrWhiteSpace(x.ImageFilename)) { i = UIImage.FromFile("Images/" + x.ImageFilename + ".jpg"); } c.UpdateCell(x.Name, x.Category, i); return(c); }