Sephiroth87 / ODRefreshControl

A pull down to refresh control like the one in Apple's iOS6 Mail App
MIT License
2.14k stars 385 forks source link

Calling beginRefreshing #24

Closed czuvichEvernote closed 12 years ago

czuvichEvernote commented 12 years ago

I am trying to invoke beginRefreshing, but I've noticed some strange behavior. Perhaps there is some guidance you can offer:

I would like to notify the user that data is being refreshed in the UITableView, but I do not want to block the user from the existing data. It looks like (intentionally) calling beginRefreshing does not animate the control down to indicate a refresh. I would like for that behavior to be present in the control or perhaps some guidance as to how to get that to work. For instance, if I animate it myself, I do not want to the user to be able to pull down to refresh. Do you have any examples of doing that?

Sephiroth87 commented 12 years ago

Mhm, I guess you could animate the scroll yourself, the control height is 44, but you can't stop the user to pulling down the tableView more, unless you disable bouncing.

czuvichEvernote commented 12 years ago

How would you animate the control down when beginRefreshing is invoked?

Sephiroth87 commented 12 years ago

You could probably just do something like:

[refreshControl beginRefreshing]; [self.tableView setContentOffset:CGPointMake(0, -44) animated:YES];

Sephiroth87 commented 12 years ago

I'm closing this as it should be resolved, if you need something else ask freely :)