表題の通りの問題。
半ば諦めていたけども、下記のようにすれば無事に解決。
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
[refreshControl addTarget:self
action:@selector(onSwipeReloadData:)
forControlEvents:UIControlEventValueChanged];
self.myCollectionView.refreshControl = refreshControl;
// データが空でもUIRefreshControlを使えるようにする
self.myCollectionView.alwaysBounceVertical = YES;
- (void)onSwipeReloadData:(UIRefreshControl *)refreshControl
{
[refreshControl beginRefreshing];
*** なんかいろいろ処理 ***
[self presentViewController:alert animated:YES completion: ^
{
// completion内で呼んでやればちゃんと閉じる!
[refreshControl endRefreshing];
}];
}