2012-01-24 14 views
-5

TableViewに行を動的に追加するアプリケーションが必要です。それを実装する方法は?動的にUITableViewに行を追加するには?


これは動作していないよう:

NSIndexPath *path = [[NSIndexPath alloc]initWithIndex:(rowCount - 1)]; 
[self.tableView insertRowsAtIndexPaths: 
    [NSArray arrayWithObject:path] withRowAnimation:UIViewAnimationCurveEaseIn]; 
+0

何か試しましたか?私たちに見せるためのコードはありますか? –

+0

質問にはある程度の詳細を追加する必要があります。それ以外の場合は、良い答えを得ることはできません。チェックアウト[UITableView](http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableView_Class/Reference/Reference.html) – Besi

答えて

0

は見て:

-(void)insertRowsAtIndexPaths:(NSArray *)indexPaths  
     withRowAnimation:(UITableViewRowAnimation)animation 

あなたがこの質問を書いてしばらく待っていた場合、あなたは、多くのを見ているだろう似たような質問のための の提案。

+0

問題は、それが私のために動作しないということです.. NSIndexPath * path = [[NSIndexPath alloc] initWithIndex:(rowCount - 1)]; [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:path] withRowAnimation:UIViewAnimationCurveEaseIn]; – GeorgeBuron

関連する問題