2012-10-25 27 views
0

沒有人知道如何以編程方式將表視圖滾動到索引路徑中的部分。我想要做的是有2個部分的tableview和if語句例如iOS滾動到UITable視圖中的部分

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 
+0

我想我不明白你的要求。你想如何滾動*向上*隱藏第一部分?你是否試圖實施某種拉動來刷新? –

回答

3

下面是摘錄:

NSIndexPath * indexPath = [NSIndexPath indexPathForRow:row inSection:section]; 
[_tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];