Exemplo n.º 1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            // Reuse a cell if one exists
            ScreenListCell cell = tableView.DequeueReusableCell("ScreenListCell") as ScreenListCell;

            if (cell == null || cell.HasIcon != owner.ShowIcons || cell.HasDirection != owner.ShowDirections)
            {
                // We have to allocate a cell
                cell = new ScreenListCell(tableView.Frame.Width, owner.ShowIcons, owner.ShowDirections);
            }

            cell.RefreshCell(owner, screen, ctrl.Engine, owner.Items[indexPath.Row]);

            return(cell);
        }
Exemplo n.º 2
0
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{ 
			// Reuse a cell if one exists 
			ScreenListCell cell = tableView.DequeueReusableCell ("ScreenListCell") as ScreenListCell;
			
			if (cell == null || cell.HasIcon != owner.ShowIcons || cell.HasDirection != owner.ShowDirections) 
			{  
				// We have to allocate a cell 
				cell = new ScreenListCell(tableView.Frame.Width, owner.ShowIcons, owner.ShowDirections);
			}
			
			cell.RefreshCell (owner, screen, ctrl.Engine, owner.Items[indexPath.Row]);

			return cell; 
		}