You can implement the UIScrollview delegation method scrollViewDidScroll . IF you assign a tableview delegate to self or you have implemented or validated a UITableViewDelegate , then you will automatically align the UIScrollViewDelegate protocall because UITableViewDelegate implements UIScrollViewDelegate .
In scrollViewDidScroll ,
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{ UITableView *tab = (UITableView *)scrollView; if (self.yourTableView == tab) {
source share