コード例 #1
0
    public TableViewCell GetCellForRowInTableView(TableView tableView, int row)
    {
        MyTableViewCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as MyTableViewCell;

        if (cell == null)
        {
            cell              = (MyTableViewCell)GameObject.Instantiate(m_cellPrefab);
            cell.name         = "MyTableViewCellInstance_" + row;
            cell.cellCallback = CellCallback;
        }
        cell.updateInfo(datas[row] as MyCellInfo);
        return(cell);
    }
コード例 #2
0
 void CellCallback(MyTableViewCell cell, MyCellInfo info)
 {
     m_tableView.NotifyCellDimensionsChanged(info.index);
 }