我使用IB在Xcode 4中創建了一個UITableViewCell
。但是,當我觸發我的編輯按鈕時,出現一些奇怪的原因,cell
的行爲真的很奇怪,並沒有與普通表格視圖單元格相同的動畫。我不知道發生了什麼,我嘗試在我的自定義單元類中實現-(void)setEditing:(BOOL)editing animated:(BOOL)animated
,但仍然無效。編輯自定義單元格時出現奇怪的動畫?
UPDATE:我的,我現在用的細胞中ViewController
,有cellForAtIndex
下此代碼,以顯示該單元格。
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil)
{
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil];
for (id currentObject in topLevelObjects)
{
if ([currentObject isKindOfClass:[UITableViewCell class]])
{
cell = (CustomCell *) currentObject;
break;
}
return cell;
}
}
普通視圖:
當攻編輯按鈕:
甚至當刷卡它覆蓋在它應該拋開移動它的文字:
更新的問題,進一步說明這個問題。 – Souljacker 2012-01-11 19:42:33
@ Ravin455 - 我完全理解你的問題。我去過那兒。無需進一步解釋。 – Steve 2012-01-11 19:43:31
如果我必須以編程方式添加它,那麼我應該如何添加它?我唯一的問題是在左側添加複選框UIButton。 – Souljacker 2012-01-11 19:45:24