public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell("TorrentsCell"); var torrent = _server.Torrents[indexPath.Row]; TorrentCellController controller = null; if (cell == null) { controller = new TorrentCellController(); cell = controller.Load(torrent); cell.Tag = _id++; _controllers[cell.Tag] = controller; } else { controller = _controllers[cell.Tag]; controller.Load(torrent); } return cell; }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell("TorrentsCell"); var torrent = _server.Torrents[indexPath.Row]; TorrentCellController controller = null; if (cell == null) { controller = new TorrentCellController(); cell = controller.Load(torrent); cell.Tag = _id++; _controllers[cell.Tag] = controller; } else { controller = _controllers[cell.Tag]; controller.Load(torrent); } return(cell); }