0

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?

Roland Keesom
  • 8,180
  • 5
  • 45
  • 52
Itai Caspi
  • 39
  • 1
  • 9
  • avoid use compound sentences. Use dots and comas, make some logical paragraphs to make you description easier to understand. – Marek R Aug 29 '13 at 12:28
  • Why you don't use github.com/enormego/EGOTableViewPullRefresh ? Don't make your own this class is very well written – iEinstein Aug 29 '13 at 12:30
  • well I wasn't familiar with this class, and I already implemented my own... So now i prefer trying to make my own class work because it's almost complete... but I'll take a look at this class and try to learn from it. thanks. – Itai Caspi Aug 29 '13 at 12:47

1 Answers1

0

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
Davi Stuart
  • 269
  • 3
  • 16