2012-04-05 21 views
0

テーブルビューを上下にスクロールするときに、テーブルビューのセルが選択されていません。どのように私はコードで次のメソッドを使用する必要がありますか?iPhoneのテーブルビューのセル選択

[tableview selectRowAtIndexPath:animated:scrollPosition]; 
+0

uは内部このメッセージしようとしています - (ボイド)のtableView:(のUITableView *) tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath ???いくつかのコードを入れて..! –

答えて

1

次のコードはどのように使用しますか?

[tableview selectRowAtIndexPath:animated:scrollPosition]; 

:テーブルビューに新しいセルを追加し、追加のセルまでのテーブルをスクロール追加:

NSArray *indexPaths = [NSArray arrayWithObjects: [NSIndexPath indexPathForRow:[self.yourDataSource count]-1 inSection:0],nil]; 
[self.myTableView beginUpdates]; 
[self.myTableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationTop]; 
[self.myTableView endUpdates]; 
[self.myTableView scrollToRowAtIndexPath:indexPaths atScrollPosition:UITableViewScrollPositionTop animated:YES]; 
関連する問題