
tableview 최상단으로 이동
[mTable setContentOffset:CGPointMake(0, 0) animated:NO];
테이블뷰 갱신이나 reload 시 자주 써먹게 되는 방법
update
테이블뷰 최하단으로 이동
[filedata count]은 row의 전체갯수이며 row의 마지막값은 전체갯수보다 항상 -1 작으므로
[filedata count] - 1
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[filedata count] - 1 inSection:0];
[mTable scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
반응형
그리드형