'UITableView'에 해당되는 글 2건

  1. 2016.10.10 [IOS / Object-C] - UITableView scroll bottom check
  2. 2016.10.05 [IOS / Object-C] - UITableView scroll bottom 스크롤 하단으로 보내기

[IOS / Object-C] - UITableView scroll bottom check

IOS ( Object-C ) 2016. 10. 10. 14:39
반응형

- (void) scrollViewDidEndDecelerating : (UIScrollView *) scrollView {

  NSArray *visibleRows = [__tableView visibleCells];

  UITableViewCell *lastVisible = [visibleRows lastObject];

  NSIndexPath *path = [__tableView indexPathForCell:lastVisible];

  

//  NSLog(@"Section : %d // Row : %d", path.section, path.row);

  

  if( path.row == [__tableData count] - 1 ) {

    NSLog(@"Scroll Bottom");

  }

}

반응형
:

[IOS / Object-C] - UITableView scroll bottom 스크롤 하단으로 보내기

IOS ( Object-C ) 2016. 10. 5. 13:48
반응형

NSInteger i = [__tableView numberOfSections] - 1;

  NSInteger lastRowIndex = [__tableView numberOfRowsInSection:i] - 1;

  NSIndexPath *indexPath = [NSIndexPath indexPathForRow:lastRowIndex inSection:i];

  

  [__tableView scrollToRowAtIndexPath:indexPath

                     atScrollPosition:UITableViewScrollPositionBottom

                             animated:YES];

반응형
: