//Will be called by the TableView when a cell needs to be created for display public Tacticsoft.TableViewCell GetCellForRowInTableView(Tacticsoft.TableView tableView, int row) { LevelSelectCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as LevelSelectCell; if (cell == null) { cell = (LevelSelectCell)GameObject.Instantiate(m_cellPrefab); cell.name = "LevelSelectCellInstance_" + row.ToString(); } cell.SetLevelName(filesList [row].Key); cell.SetLevelPath(filesList [row].Value); return(cell); }
/// <summary> /// Create a cell for a certain row in a table view. /// Callers should use tableView.GetReusableCell to cache objects /// </summary> public Tacticsoft.TableViewCell GetCellForRowInTableView(Tacticsoft.TableView tableView, int row) { SessionCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as SessionCell; if (cell == null) { cell = (SessionCell)GameObject.Instantiate(m_cellPrefab); cell.name = "VisibleCounterCellInstance_" + (++m_numInstancesCreated).ToString(); } cell.tableClickController = this; cell.rowNumber = row; cell.sessionInfo = sessionList [row]; return(cell); }