简体   繁体   中英

UIrefresh Control on UIcollectionView at the top and bottom

I want to add paging in my collectionView. I am using Waterfall layout in my collection View. Having two rows only.

Scrolling is horizontal. I want to add paging in such a way that user can go back and forth the pages.

I found one of that over Git by Simon Westerlund. But in this UIrefreshCOntrol is added at the top only. I want to ahev UIrefresh control at the bottom too. So that I can show paging Effect. Just as, its in the case of Facebook app

I think you can use bounce effect of UICollectionView coz its already inherited from UIScrollView and use following delegate method

You just have to add following lines and call your method instead of [self fetchMoreEnteries]

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    float endScrolling = scrollView.contentOffset.y + scrollView.frame.size.height;
    if (endScrolling >= scrollView.contentSize.height)
    {
        NSLog(@"Scroll End Called");
        [self fetchMoreEntries];
    }
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM