Пример #1
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                var cell = tableView.DequeueReusableCell(NodeViewCell.Key) as NodeViewCell;

                if (cell == null)
                {
                    cell = NodeViewCell.Create(_nodeView);
                }

                cell.ResetView();

                if (_root && indexPath.Row == 0)
                {
                    cell.Node = new TreeNode()
                    {
                        IsFavorite = true,
                        Name       = "Lokale favorieten"
                    };
                }
                else
                {
                    cell.Node = _node.Children [indexPath.Row - (_root ? 1 : 0)];
                }


                return(cell);
            }
Пример #2
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                var cell = tableView.DequeueReusableCell(NodeViewCell.Key) as NodeViewCell;

                if (cell == null)
                {
                    cell = NodeViewCell.Create(_nodeView);
                }

                cell.ResetView();

                cell.Node = _node[indexPath.Row];


                return(cell);
            }