pronebird / UIScrollView-InfiniteScroll

UIScrollView ∞ scroll category
MIT License
1.06k stars 148 forks source link

Pull down to refresh. #8

Open heistings opened 9 years ago

heistings commented 9 years ago

I think this is a quite great feature if implemented.

heistings commented 9 years ago

And it will be perfect if tableView.tableHeaderView and pull to refresh are both available to me. Using tableView.tableHeaderView to show temporary info, such as activity, is quite convenient.

davidganster commented 9 years ago

A standard UITableView already supports this feature. Just add this line in viewDidLoad:

self.refreshContol = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self action:@selector(yourAction:) forControlEvents:UIControlEventValueChanged];
heistings commented 9 years ago

@davidganster refreshContol can only be used in subclass of UITableViewController. It is not a UIScrolView feature. Both UITableView and UICollectionView need this feature.

davidganster commented 9 years ago

Sorry - you are correct of course. I was getting hung up on UITableViewController since you mentioned tableView.tableHeaderView.

heistings commented 9 years ago

@davidganster Never mind.

pronebird commented 9 years ago

It's a little bit outside of scope of this library, but since we already hacked UIScrollView it should be pretty trivial to add pull to refresh. I wonder if UIRefreshControl can be used without table view controller. I think it worked fine with collection views this way, but I am not sure about pure scroll view.

lgcassab commented 9 years ago

I'd like to have this inverted trigger too.

pronebird commented 9 years ago

@lgcassab I've been thinking about pull up to load more too.

seapy commented 8 years ago

@pronebird pull up to load more +1

CavalcanteLeo commented 8 years ago

please, implement this feature +1

ghost commented 7 years ago

Use UIRefreshControl for tableView. It's very fast and easy.

CavalcanteLeo commented 7 years ago

@dartkinselok it needs to pull way down to refresh, not just a little

Alex293 commented 7 years ago

Any chance to see this implemented ?