在 tableview的上面 添加 一个view, 下面 加一个 button,都是 监听 scrollview的滑动而已,

 if (_refreshHeaderView == nil)

    {

EGORefreshTableHeaderView *view = [[EGORefreshTableHeaderViewalloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.tableView.bounds.size.height, self.view.frame.size.width, self.tableView.bounds.size.height)];

view.delegate = self;

[self.tableView addSubview:view];

_refreshHeaderView = view;

}

 

 

 if (_moreCell == nil)

    {

        _moreCell = [[UITableViewCellalloc] initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:@"MoreCell"];

        _moreButton = [TTMoreButtonbutton];

        [_moreButtonaddTarget:selfaction:@selector(loadMore) forControlEvents:UIControlEventTouchUpInside];

        [_moreCell.contentViewaddSubview:_moreButton];

    }

    

    return_moreCell;

原文地址:https://www.cnblogs.com/guligei/p/3288591.html