[英]Why are my custom cells blank ?
我在這里先向您的幫助表示感謝-
我有一個帶有自定義單元格的UITableView。 如果我插入一個斷點並記錄該單元格的值,那是正確的,但是當我執行代碼時,表視圖始終為空白(但單元格的數量正確)
Cell *cell = (Cell *)[tableView dequeueReusableCellWithIdentifier:[Cell reuseIdentifier]];
if (cell == nil)
{
cell = [Cell cell];
}
StoreData *currentStore = [_storeArray objectAtIndex:indexPath.row];
cell.phoneNumber.text = currentStore.phoneStr;
cell.address.text = currentStore.addressStr;
return cell;
謝謝您的幫助
您確定使用類或筆尖注冊了自定義單元嗎? 同樣,您要根據詢問單元格的標識符來請求出隊-但您必須確保已為嘗試出隊的每個類進行注冊。 最后,還要確保您還在情節提要或nib文件中設置了identifier屬性。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.