how to stop UITable view from automatic bouncing

209 views Asked by At

I am working on an iOS app that implements a UITableView I have a TableHeaderView (for a custom pull to refresh) I want the header view to be hidden on top of the other rows until the user pulls down It all works fine when there are a lot of rows but when there are only a few rows I get a bug. Because when the user pulls the rows -UP- the table view bounces and the header view is revealed.

I want to make the table view "think" that the top most position is the first row and not the header view.

How can I do this?

1

There are 1 answers

0
Davi Stuart On

Well, you don't want to implement EGORefreshTableHeaderView, so: download the EGORefreshTableHeaderView.m only, and read the code. Basically, it does not use header, create a view and add to tableview, set delegate of scroll and treat it as you want.

Or you can set delegate in your table view and treat (use the code of framework to make yours):

- (void)scrollViewDidScroll:(UIScrollView *)scrollView