I\'d like to add a header view to an UIWebView
similar to the address/search bar in MobileSafari and the excellent Articles.app by Sophia Teutschler. More preci
Enormego published some sample code to make the pull-to-refresh thing happen:
https://github.com/enormego/EGOTableViewPullRefresh
It's really not so complicated. You can get a Safari/Articles-style header bar in your table view simply by creating your header bar and just adding it to your UITableView
as a subview. I'm doing exactly that on the app I'm working on now:
GBSpendingMeter *meterView = [[[GBSpendingMeter alloc] initWithFrame:CGRectMake(0,0,320,44)] autorelease];
// The meterView will appear pinned to the top of the table, similar to a headerView
[self.tableView addSubview:meterView];
The tricky part is observing the scroll events on the table (FYI, UITableView is a subclass of UIScrollView so all the same notifications/callbacks should work), but the sample code I linked to has a good example of how that works.