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;
        }
Beispiel #2
0
        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);
        }