samvermette/SVPullToRefresh — pull request #129 by Gabro (2013-05-25 20:07:23+00:00)
Title: Added option for pull to refresh at top

Added `-addInfiniteScrollingWithActionHandler:direction:` which takes a `SVInfiniteScrollingDirection` as second parameter.

`SVInfiniteScrollingDirection` may be either:
- `SVInfiniteScrollingDirectionBottom` : pull to refresh from the top of the scroll view (the current behavior)
- `SVInfiniteScrollingDirectionTop` : pull to refresh from the bottom of the scroll view

`-addInfiniteScrollingWithActionHandler:` defaults on `SVInfiniteScrollingDirectionBottom`, making this update fully backward compatible.

This completes the work started in https://github.com/samvermette/SVPullToRefresh/pull/123, so that an infinite scrolling at the top can be combined with a pull to refresh at the bottom.

-------

Example

[self.tableView addInfiniteScrollingWithActionHandler:^{
[weakSelf insertRowAtBottom];
} direction:SVInfiniteScrollingDirectionTop];

will result in the following behavior

![SVPullToRefresh from bottom](http://f.cl.ly/items/35141l3z1N0H0u0F3y2m/Screen%20Shot%202013-05-25%20at%203.00.03%20PM.png)