The answers to both (1) and (2) are yes.
Just add an instance of UIRefreshControl as a subtask .collectionView and it just works.
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(startRefresh:) forControlEvents:UIControlEventValueChanged]; [self.collectionView addSubview:refreshControl];
What is it! I would like this to be mentioned somewhere in the documentation, although sometimes a simple experiment does the trick.
EDIT: This solution will not work if the collection is not large enough to have an active scrollbar. If you add this statement,
self.collectionView.alwaysBounceVertical = YES;
then everything works fine. This fix is taken from another post on the same topic (link in the comment in another answer).
mjh Oct 26 '12 at 22:52 2012-10-26 22:52
source share