2023-05-06

tableview 上拉顺滑加载

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {

    NSInteger row = [indexPath row];

    if (row == self.dataArray.count - 2 && self.isfinish) {

//dataArray是存放数据的数组,isfinish是请求是否完成的标识

        self.pageNum++;//第几页

     //请求参数//具体请求

    }

}

你可能感兴趣的:(2023-05-06)