2010-06-20 8 views
0

나는jQuery과 /있는 UIScrollView scrollToItemAtIndex

[tableView scrollToItemAtIndex: [tableView indexForCell: firstVisibleCell] atScrollPosition: UITableViewScrollPositionTop animated:YES]; 

가 표시되는 첫 번째 항목에 '스냅'내 테이블을 강제로 호출하는 것을 시도하고있다. 이것은 잘 작동하지만 (문서에 언급 된) 완료했다 스크롤 할 때 난 단지

- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView 

에 대한 호출을 얻는다. 어쨌든 의 오프셋을 얻을 수 있습니까? firstVisibleCell 그래서 스크롤을해야하는지 비교할 수 있습니까?

NSIndexPath *indexPath = [tableView indexForCell:firstVisibleCell]; 
CGRect rect = [tableView rectForRowAtIndexPath:indexPath]; 

답변

1

사용 방법 - (CGRect)rectForRowAtIndexPath:(NSIndexPath *)indexPath

. 감사!
+0

내가 찾던 정확히 무엇을 : – Kyle