0

テーブルビューをインデックスパスのセクションにプログラムでスクロールする方法を知っている人はいますか。私がやろうとしているのは、たとえば2つのセクションとifステートメントを含むテーブルビューを作成することです。

if loading = true scroll the table view up to hide the first section
when finished loading scroll table view back down to show first section
4

1 に答える 1

3

スニペットは次のとおりです。

NSIndexPath * indexPath = [NSIndexPath indexPathForRow:row inSection:section];
[_tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
于 2012-10-25T12:55:40.733 に答える