2010-05-15 67 views
1

插入一行時,我有tableview中保持數據的列表,當用戶按下「編輯」奇怪動畫的UITableView

我在底部添加一個額外的行話說「新增」

- (void)setEditing:(BOOL)editing animated:(BOOL)animated 
{ 
    [super setEditing:editing animated:animated]; 

    NSArray *paths = [NSArray arrayWithObject: 
         [NSIndexPath indexPathForRow:1 inSection:0]]; 
    if (editing) 
    { 
     [[self tableView] insertRowsAtIndexPaths:paths 
           withRowAnimation:UITableViewRowAnimationTop]; 
    } 
    else { 
     [[self tableView] deleteRowsAtIndexPaths:paths 
           withRowAnimation:UITableViewRowAnimationTop]; 
    } 
} 

,當然還有帶動畫的UITableView轉換, ,但奇怪的是,我剛添加的那一行之前的那一行,具有不同於其他動畫的動畫。

所有行都執行「幻燈片」動畫,但倒數第二個動畫做了「淡入」動畫。

我沒有在最後一排(或任何其他行)上設置任何動畫,如果我沒有添加新行,當我切換到編輯模式時,動畫正常滑入。

不知怎的,我無法找到答案,我檢查與我的手機上的聯繫人應用程序,它沒有像我那樣奇怪的動畫,當他們在編輯模式中添加一個新行。

任何幫助,將不勝感激。 謝謝

回答

0

這可能不是你想要的答案,但我有同樣的問題。但它只出現在iPhone Simulator 3.1.3或更舊版本上,而不是3.2 iPad Simulator上。我想這是保存假設此動畫故障是iPhone(SDK)中的錯誤。