示例#1
0
        public CTableViewCell DequeueReusableCell(Type cellType)
        {
            CTableViewCell cell = TryGetUsedCellForType(cellType);

            if (cell != null)
            {
                cell.PrepareForReuse();
                return(cell);
            }

            return(null);
        }
示例#2
0
        private void RecycleCell(CTableViewCell cell)
        {
            Type cellType = cell.GetType();

            TableViewCellList cellList;

            if (!m_reusableCellsLists.TryGetValue(cellType, out cellList))
            {
                cellList = new TableViewCellList();
                m_reusableCellsLists[cellType] = cellList;
            }

            cell.PrepareForReuse();
            cellList.AddLastItem(cell);
        }