/** * reloads data from data source. the view will be refreshed. */ public void ReloadData() { m_eOldDirection = CCScrollViewDirection.None; foreach (CCTableViewCell cell in m_pCellsUsed) { if (m_pTableViewDelegate != null) { m_pTableViewDelegate.TableCellWillRecycle(this, cell); } m_pCellsFreed.Add(cell); cell.Reset(); if (cell.Parent == Container) { Container.RemoveChild(cell, true); } } m_pIndices.Clear(); m_pCellsUsed = new CCArrayForObjectSorting(); _updateCellPositions(); _updateContentSize(); if (m_pDataSource.NumberOfCellsInTableView(this) > 0) { ScrollViewDidScroll(this); } }
/** * reloads data from data source. the view will be refreshed. */ public void ReloadData() { foreach (CCTableViewCell cell in m_pCellsUsed) { m_pCellsFreed.Add(cell); cell.Reset(); if (cell.Parent == Container) { Container.RemoveChild(cell, true); } } m_pIndices.Clear(); m_pCellsUsed = new CCArrayForObjectSorting(); _updateContentSize(); if (m_pDataSource.NumberOfCellsInTableView(this) > 0) { ScrollViewDidScroll(this); } }