您可以在
adding it to collection’s subviews之前将UIRefreshControl添加到UICollectionView(或任何UIScrollView):
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged]; [self.collectionView addSubview:refreshControl];
当集合视图布局具有UICollectionViewScrollDirectionHorizontal
时,这不起作用.
我尝试覆盖layoutSubviews以将刷新控制放在左侧,但它不会以这种方式跟踪滚动进度.我可以欺骗它使用水平布局吗?