我製作了自定義UITableViewCell
,其中包含像標籤和segmentcontrol
元素但是當我嘗試訪問cellforrowatindexpath
中的元素時,元素未分配任何內存。該單元實例已分配內存。我檢查了xib並連接了網點。 這裏是在cellforrowatindexpath
代碼 -自定義UITableView單元格中的標籤未在iOS6中分配內存
SegmentCell *cell;
[tableView registerNib:[UINib nibWithNibName:@"SegmentCell" bundle:nil] forCellReuseIdentifier:@"SegmentCell"];
[tableView registerClass:[SegmentCell class] forCellReuseIdentifier:@"SegmentCell"];
cell = (SegmentCell *)[tableView dequeueReusableCellWithIdentifier:@"SegmentCell" forIndexPath:indexPath];
[email protected]"Hell*emphasized text*o";
return cell;
標題是顯示在打印的說明無標籤
標題是我創建的標籤的名稱。抱歉應該說清楚。 是否因爲名稱有衝突? – Nitesh